Day 52 of 90 Days of DevOps Challenge: Powering Jenkins with GitHub, Docker & Plugins


Yesterday, I created my first Jenkins Freestyle Job that successfully pulled code from GitHub, executed a basic shell script, and was triggered both manually and using Poll SCM. This hands-on experience helped me understand Jenkins’ core job lifecycle, especially how Source Code Management (SCM) integration and build execution work together in a typical CI flow.
Today, I focused on extending Jenkins functionality by integrating it with GitHub using webhooks for automatic job triggers, installing essential plugins like Git, Docker, and Email Extension, and configuring a Jenkins job to build Docker images. I also explored post-build steps such as archiving artifacts and setting up email notifications to enhance automation and visibility in the pipeline.
Integrating Jenkins with GitHub (Using Webhooks)
To automate builds on every code push, I configured a GitHub webhook to trigger Jenkins.
Steps:
In Jenkins:
- Job > Configure > Build Triggers > Select “GitHub hook trigger for GITScm polling”
In GitHub:
Repo > Settings > Webhooks > Add Webhook
URL:
http://<your-jenkins-server>:8080/github-webhook/
Content type:
application/json
Trigger on “Just the push event”
Now, whenever I push code to GitHub, Jenkins builds automatically—no manual trigger or polling needed!
Installing Essential Jenkins Plugins
To extend Jenkins’ capabilities, I installed several core plugins from Manage Jenkins > Manage Plugins:
Plugin Name | Use Case |
Git Plugin | Clone GitHub repositories |
Docker Plugin | Build and run Docker containers from Jenkins |
Blue Ocean | Modern, visual UI for pipelines |
Email Extension | Send build result emails |
GitHub Plugin | Integrates Jenkins with GitHub API |
You can install them by checking the boxes under the Available tab and clicking Install without restart.
Build and run a Docker Image using Jenkins
To automate Docker builds, I created a simple pipeline job that:
Clones the repo
Builds a Docker image
(Optionally) runs the container
Sample Shell Command (inside a Freestyle job):
echo "Building Docker image..."
docker build -t myapp:latest .
echo "Running container..."
docker run -d -p 8080:8080 myapp:latest
Tip: Ensure Docker is installed on the Jenkins host and the Jenkins user has permission to execute Docker commands
Post-Build Actions
Post-build actions are crucial for reporting, feedback, and traceability. I explored two main actions:
Archive Artifacts:
Stores the output of the build (e.g.,.jar
,.war
, logs) for later use or download from Jenkins UI.Email Notifications:
Using the Email Extension Plugin, I configured notifications to send build status (success/failure) to team members. This requires SMTP setup under Manage Jenkins → Configure System.
These steps make Jenkins more than just a build tool—they enable continuous feedback and release readiness.
Final Thoughts
Today was all about making Jenkins production-ready by connecting it with GitHub, Docker, and essential plugins. With webhook triggers and Docker integration, Jenkins now builds and deploys the moment I push code.
These integrations are where Jenkins starts to shine, not just as a job runner, but as a central hub for CI/CD automation.
Subscribe to my newsletter
Read articles from Vaishnavi D directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
