Automate Building CI/CD pipelines with Jenkins and GitHub

Automate Building CI/CD pipelines with Jenkins and GitHub

July 17, 2020 / Nirav S

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.

Step 1

Login to your Jenkins account

Step 2

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

Step 3

Put the description about the Jenkins job you are creating.keep the value of Max # of builds to keep as 5

Step 4

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.

Step 5

In Build option, Execute Shell.

Some basic command that I put here are

Free -m

Step 6

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.

Step 7

Click on configure

Step 8

Now go to your git account and Clone or Download and copy the repository URL.

Step 9

Source Code Management and click on Git. Paste the copied URL of Git Repository

Step 10

Now scroll down to build and write below commands

git pull origin master 
git status
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.

Talk to AWS Certified Consultant

    Let Us Talk About Your AWS Development Requirements

    Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project