CI/CD process means the Continuous Integration Continuous Development which is an agile DevOps workflow focused on a frequent and reliable software delivery process. The CI/CD pipeline helps development teams improve quality, work faster and improve other DevOps metrics
What is Jenkins
Jenkins is an open-source automation server which enables developers around the world to reliably build, test, and deploy their software. In this tutorial we will learn the following things:
Install Jenkins
Download and install from here.
During installing, select logon type as LocalSystem and Next
Then input port as 7070
Click on Test Port and Next. If a green tick mark appears, then you are ready to go
Then confirm the JDK location and Next
Allow the firewall exception and next
Click on the Install button
After completing the installation go to the location: http://localhost:7070
Then unlock Jenkins

Go to the location and copy-paste the password and continue
Then select Install suggested plugins and continue
After installing it successfully, you will be redirected to the Jenkins dashboard.

Integrate Jenkins with Github
Now give any of your project names
Click on Freestyle project and ok
Now you are in the project configuration screen
Select Git from Source Code Management Section
Give the github repo url of your project as https://github.com/salmansrabon/axios-api-test-demo.git
Now edit your branch name
Now select Poll SCM from Build Triggers section
Input * * * * * in the script
Now select Execute Windows batch command in the build section
Now clone your repository in any drive and locate the project in the script field by this command:
d:
cd "Automation_Work\API Automation\axios-demo-api-test"
npm test file .\customers.test.js
d: means which drive you have cloned your repo
cd “<project location>” means where is your project location
the last line is the command to execute your project
Now save the configuration
Now click on Build Now button and you will see the project is running throw Jenkins in the build history.
Now edit your code and push it to GitHub. Then you will see that Jenkins will automatically trigger the run command of your project.
Congratulations! you have to integrate Jenkins with Github successfully.
Leave a Reply