Mohan Golla
6 min readJan 29, 2024

Building Application in Jenkins Pipeline Build Triggers and Deployment in an automated way using Github Webhooks

In this hands-on project, I acted as DevOps Cloud Engineer with the objective to automate build and deployment processes using Jenkins using Github Webhooks to implement continuous integration and continuous delivery without any manual builds process.

Below are few screenshots (earlier I did the same project using manual build process using AWS and Jenkins. But this time the same project is fully automated. Any changes in the Github code will automatically trigger the Pipeline CI/CD process in Jenkins)

Below are few screenshots:

Jenkins is active and running

Create a Pipeline script from SCM(Source Control Management)

Pipeline Build successful

Console Output

EC2 public IP

Application Up and running

Stopping the docker webapp and removing image and doing system prune for next tasks that need a clean environment without any old application and image

Create new access token in Docker Hub

Creating credentials in Jenkins

Created private repository in Github and uploaded the files

Created Personal Access Token

Create a New Pipeline in Jenkins

Build Now in Jenkins is successful

Console Output

Image on Docker Hub

EC2 public IP

Application Up and running

Now comes the part where the automation of Build is configured using GitHub Webhooks

Going back to the earlier build to copy the Jenkins URL which will be copied in the Webhooks Payload URL section in Jenkins

Webhooks Payload URL section in Jenkins — From now on any code change in Github will automatically trigger a Build in Jenkins without any manual step.

Webhook is created and able to successfully ping

Now going to make change to the Dockerfile

Change made and commit changes.

Once the commit changes are complete the Build is triggered in Jenkins

Opening the earlier application that was there in another browser and doing a refresh to check if the code changes are reflected in the application.

We can see the change is reflected in the updated application page

Now making another change, now in index.html to check if the Build in Jenkins is triggered automatically.

The Build is triggered automatically in Jenkins

The new change made in index.html is reflected in the application.

We can see now how Build and Deployment process is automated without any manual intervention in the Build process using Jenkins….Amazing!!!

Mohan Golla
Mohan Golla

No responses yet