Jenkins: Something about triggers and how to create a simple job with GitHub

To create a new job or items

Some about the Github :

let's try to build a small and basic job in Jenkins Without Trigger

Triggers :

  • Trigger build remotely (eg: from a script)
  • build after other projects are build
  • build periodically
  • Github hooks trigger from gitscm polling
  • Poll Scm
You can see the build triggers option in job's -> Configure setting.
  • Trigger builds remotely
  • Build after other projects are built
  • Build periodically
  • GitHub hook trigger for GITScm polling
  • Poll SCM

1. Trigger builds remotely :

predefined URL to trigger build remotely: JENKINS_URL/job/JobName/build?token=TOKEN_NAMEJENKINS_URL: the IP and PORT which the Jenkins server is running
TOKEN_NAME: You have provided while selecting this build trigger.//Example:
http://e330c73d.ngrok.io/job/test/build?token=12345

2. Build after other projects are built

Build periodically:

MINUTE HOUR DOM MONTH DOW
  • * specifies all valid values
  • M-N specifies a range of values
  • M-N/X or */X steps by intervals of X through the specified range or whole valid range
  • A,B,...,Z enumerates multiple values
# every fifteen minutes (perhaps at :07, :22, :37, :52)
H/15 * * * *
# every ten minutes in the first half of every hour (three times, perhaps at :04, :14, :24)
H(0-29)/10 * * * *
# once every two hours at 45 minutes past the hour starting at 9:45 AM and finishing at 3:45 PM every weekday.
45 9-16/2 * * 1-5
# once in every two hours slot between 9 AM and 5 PM every weekday (perhaps at 10:38 AM, 12:38 PM, 2:38 PM, 4:38 PM)
H H(9-16)/2 * * 1-5
# once a day on the 1st and 15th of every month except December
H H 1,15 1-11 *

GitHub webhook trigger for GITScm polling:

  1. Go to your project repository.
  2. Go to “settings” in the right corner.
  3. Click on “webhooks.”
  4. Click “Add webhooks.”
  5. Write the Payload URL as
http://e330c73d.ngrok.io/github-webhook
//This URL is a public URL where the Jenkins server is running

Poll SCM:

HOW TO RUN PYTHON JOB IN JENKINS

Now enjoy your trigger with Jenkins first job

The further apart on the next blog continue link given below :

--

--

--

I am pursiing B-tech. and also very fond of learning new technology under the guidance of Vimal Daga sir (World Record Holder).

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CS371p Spring 2020: Week 3

Multiple Databases in Laravel

Matchmaking using Kubernetes

How to add a .bashrc equivalent to the windows cmd terminal

How to Deploy Your Kotlin Microservice on AWS Cloud — Fargate

Windows Users Rejoice! There’s a Native Redis With ACL and TSL Support Ready for Use Now

People having fun in front of a computer

SDLC — rating and reviews for restaurants

SDLC – rating and reviews for restaurants

Server side Swift with Kitura

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vishugoyal

Vishugoyal

I am pursiing B-tech. and also very fond of learning new technology under the guidance of Vimal Daga sir (World Record Holder).

More from Medium

Setting A Route

How to lay out a software engineering resume

WWCD Mentorship Program 4.0 : Week 2

Placement Diaries: Brahmleen Kaur