Part 4: Create CI CD Jobs in Jenkins
Pipeline building

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
JenkinsfileMake Sure you have forked and configured the shared library repository for
jenkinsfilewhich usesgroovysyntax.Name the Jenkins slave node by
Nodeonly.The SonarQube tool, which Jenkins will install, should be named as
Sonaras 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 ofabhic25,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 inbackend.yamlandfrontend.yamlas 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.sockNow 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...






