Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

How to trigger a jenkins job when code is pushed to github using “GitHub hook trigger for GITScm polling”

Spread the Knowledge
 
The GitHub plugin for Jenkins is the most basic plugin for integrating Jenkins with GitHub projects. If you are a GitHub user, this plugin enables you to:
 
  • Schedule your build
  • Pull your code and data files from your GitHub repository to your Jenkins machine
  • Automatically trigger each build on the Jenkins server, after each Commit on your Git repository
This saves you time and lets you incorporate your project into the Continuous Integration (CI) process.
 

Step 1 – Install the Github Jenkins plugin

Go to “Manage Jenkins” –> “Manage Plugins” –> “Available” Tab –> Search for “GitHub plugin” and install it.

Step 2 – Configure the “GitHub plugin” with github accounts and taken

Go to “Manage Jenkins” –> “Configure System” –> Locate “Github” section and “Add Github Server” and do following modification.

  • API URL – If you server is github.com, your “API URL” would be “https://api.github.com”. Otherwise if you use GitHub Enterprise, specify its API endpoint here (e.g., https://ghe.acme.com/api/v3/).
  • Credentials – You can create your own personal access token in your account GitHub settings. Token should be registered with scopes. Refer https://github.com/settings/tokens/new . Add credentials (your Github token) and Apply.
  • “Test Connection”.

Step 3 – Configure Jenkins Job on which you want push trigger should be effective.

  • Check the GitHub project checkbox and set the Project URL to point to your GitHub Repository
  • Under Source Code Management, check Git and set the Repository URL to point to your GitHub Repository
  • Under Build Triggers, check the “GitHub hook trigger for GITScm polling” checkbox

Step 4 – Configure “webhook” on github for the specific repository.

Go to repostory settings and then “Webhooks” and Click on “Add Webhook” and then fill a “Payload URL” and leave secret empty. “Payload URL” must be your jenkins server url postfix with “/github-webhook/”. Such as http://35.154.114.196:8080/github-webhook/

Step 5 – Commit and push in Git repo using workstation and verify the job triggered new build or not?


git clone git-url
cd helloworld-java-maven/
vi readme.txt
git add --all
git commit -m"adding"
git push origin master

Facebook Notice for EU! You need to login to view and post FB Comments!
Rajesh Kumar