Hands-On: Jenkins Build Triggers with GitHub & DockerHub
## 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!
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!