July 17, 2020 / Eternal Team
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.