Jenkins - CI/CD
Jenkins :
Jenkins is an open source automation tool to automate the testing, building and deploying phases and it facilitates continuous Integration and continuous Deployment.
In this, we are going to perform CI/CD for node js application using jenkins.
Install jenkins and run it.
Select new item -> Enter item name -> choose pipeline.
we are using this repo for CI/CD.
Add the following plugins for docker.
Also add nodejs, OWASP plugins.
Once the plugins are added, we need to add the tools.
Add the following script for git checkout -> Apply -> save.
Now run the pipeline to check if it working.
Add the script for installing dependencies.
Again apply-> save and check if the dependencies are installed.
Add the OWASP script for scaning the vulnerabilities in project.
Test this also by building the project.
Add scripts for docker commands.
Test if the docker commands are working,
Add the script for running the docker container and this is our deployment phase.
Check if it is success
Open the port in the browser,
Conclusion :
We have successfully implemented CI/CD using jenkins for our node js application.
Subscribe to my newsletter
Read articles from Gopinath J directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by