Coder Social home page Coder Social logo

cicd's Introduction

cicd

Application security is a critical aspect of the software development life cycle, and integrating it into the CI/CD pipeline is essential for identifying and addressing security vulnerabilities early in the development process. You can run scans as soon as the new code is deployed by the developer.

So let's dive into integrating application security using GitLab CI/CD.

Create a new repository with sample application.

image

Add .gitlab-ci.yml file, which is also referred as CI/CD configuration file to define the pipeline, for demo we will run basic commands to explore the environment.

stages:
  - checking_environment
  - hello_world

demostage1:
  stage: checking_environment
  script:
    - echo "Sample cicd config"
    - pwd
    - ls

demostage2:
  stage: hello_world
  script:
    - echo "hello world"

stages: Used for defining stages a pipeline can have multiple stages such as build deploy each stage will be executed in order in which it is defined.

demostage1: Any random name to identify this job.

stage: Used for defining the stage.

script: Used for executing commands.

image

After you commit the file observe that pipeline is automatically started click on the blue circle button appearing near the commit hash to see the results alternatively you can navigate to Build -> Piepelines to see the status.

image

Click on checking_environment job to see the results

image

Here you can see the result of all commands that we defined in checking_environment stage.
image

  • You can observe that the path where our command are executed is /builds/tauh33dkhan1/cicd-demo where /builds is the default path and rest is our project path which can also be accessed through $CI_PROJECT_PATH cicd environment in case you need it.
  • The current path also includes our repository files

Now that you understand how CI/CD pipeline works let's configure it to run dependency scan on our project.

cicd's People

Contributors

tauh33dkhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.