Hands-On: Jenkins Build Triggers with GitHub & DockerHub

Ramesh Rao
2 min readFeb 17, 2024

--

## Overview

— — — — — -

During this module, we learned that “CD” in a CI/CD Pipeline can represent:

- Continuous Delivery (CD)

>> AUTOMATICALLY RELEASE TO REPOSITORY

- Continuous Deployment (CD)

>> AUTOMATICALLY RELEASE TO PRODUCTION

In this hands-on, we will implement a CI/CD Pipeline with ‘Continuous/Automatic Delivery’.

It means, without manual intervention, directly to Production!

Prerequisite: https://medium.com/@RameshRao2/hands-on-creating-a-jenkins-pipeline-to-build-push-and-deploy-process-using-private-github-ac3b01e5ffc7

We need to set up a ‘Webhook’:

“Webhooks are automated messengers that allow different systems to communicate.”

## Tools: Jenkins, Docker & DockerHub, Git & GitHub

[ Jenkins ]

  • jk-pipeline-private-gh
  • Configure
  • Build Triggers
  • GitHub hook trigger for GITScm polling

[ GitHub ]

Setting up ‘Webhooks’ in ‘jk-private-gh’ repository

  • From ‘jk-private-gh’ repository
  • Settings
  • Webhooks
  • Add webhook
  • Payload URL: http://<YOUR-JENKINS-SERVER-IP>:8080/github-webhook/
  • Add webhook

Make a change in ‘Dockerfile’:

Dockerfile:

From: COPY index.html . To: COPY . .

  • Commit changes…

[ Jenkins ]

  • Check the automated build process!
  • Access the application!
  • CI/CD Continuous Deployment:
  • Automatically released to production!

--

--

Ramesh Rao
Ramesh Rao

Written by Ramesh Rao

Focus on Public, Private, Hybrid Cloud Infrastructure Operation and Security

No responses yet