July 17, 2020 / Nirav Shah
Jenkins with Github is used to create CI and CD pipeline. So that we can automate the Build and Deployment process using Jenkins Jobs.
Don’t know about Jenkins? Go through this article to know, how you can install java and jenkins on AWS.
Login to your Jenkins account
Click on “manage jenkins”
And go to the “managed plugins”
So you can see all the required GIT plugins will install. It will take some time
Now to click on “create a new job” or new item and go to freestyle project
Put the description about the Jenkins job you are creating.keep the value of Max # of builds to keep as 5
Keep Source Code Management as none. As we are not using any Source Code right now.
Click on checkbox Build periodically. Put 5 stars with space like * * * * * in the schedule box and this means your job will run on every minute. This is called crontab.
In Build option, Execute Shell.
Some basic command that I put here are
Pwd W Free -m
Now your First Jenkins Build job is created. Click on the job name “New Project” to see your builds
After your build is created you will see “console output” it is very important for troubleshooting purposes.
Click on configure
Now go to your git account and Clone or Download and copy the repository URL.
Source Code Management and click on Git. Paste the copied URL of Git Repository
Now scroll down to build and write below commands
git pull origin master git status Pwd ls -lrt
And click on save, Now Click on Build Now and then Click on Build No #7300
And final step click on console output and its look like this
Congratulations! You have an automated CI/CD pipeline with Jenkins and GitHub.
Also Read: Integration of jenkins with gitlab
As a Director of Eternal Web Private Ltd an AWS consulting partner company, Nirav is responsible for its operations. AWS, cloud-computing and digital transformation are some of his favorite topics to talk about. His key focus is to help enterprises adopt technology, to solve their business problem with the right cloud solutions.
Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.