Skip to main content

Command Palette

Search for a command to run...

Part 4: Create CI CD Jobs in Jenkins

Pipeline building

Published
2 min read
Part 4: Create CI CD Jobs in Jenkins

Create a fullstack CI pipeline

The Jenkins Pipeline script you will get in my GitHub —> Jenkinsfile, before putting the pipeline script in Jenkins, do the below steps:

  • Fork the Repository

  • Go to Jenkinsfile

  • Make Sure you have forked and configured the shared library repository for jenkinsfile which uses groovy syntax.

  • Name the Jenkins slave node by Node only.

  • The SonarQube tool, which Jenkins will install, should be named as Sonar as per the pipeline script.

  • Make Sure you change the repository URL and branch as per your GitHub URL.

  • Change the image name and username.

Note- In terms of sucessful pipleine run we need to setup all customized parameters as per our environment variables

  • In place of fullstack-backend-beta, Put the name of docker image that you want, and in place of abhic25, put your Dockerhub username so that it gets tagged with it.

Create one more pipeline fullstack-cd

  • The Jenkins Pipeline script you will get in my GitHub —> GitOps → Jenkinsfile, before putting the pipeline script in Jenkins, change all the customized parameters with respect to environments

Ex. What we did for the CI Job earlier

  • Go to Kubernetes → Change the username in backend.yaml and frontend.yaml as per your Dockerhub username.

After all of this, Our Jobs are now ready create one more pipeline, fullstack-CD

  • Provide permission to docker socket so that Docker build and push commands do not fail (On the Jenkins Slave)

  • Sudo chmod 777 /var/run/docker.sock
    
  • Now Click on fullstack-ci and build, and then when it gets completed, fullstack-cd will automatically trigger and get built.

  • Note- We have provide new Tag in ci job each time so CD will detect cahnge in Image and copletes job sucessfully

  • CI Job

  • CD Job

Next...


22 views

DevSecOps Pipeline on AWS

Part 3 of 6

A step‑by‑step guide to building a secure, automated CI/CD pipeline on AWS using Jenkins, GitHub, Argo CD, Kubernetes, Prometheus, and Grafana. This series covers everything from code quality checks and vulnerability scanning to GitOps deployments and monitoring dashboards.

Up next

Part 3: Tools Integration with Jenkins

Install plugins, tools, and configuration