Skip to content

Instantly share code, notes, and snippets.

View mahdit83's full-sized avatar
🔵
Focusing

Mahdi Tajik mahdit83

🔵
Focusing
View GitHub Profile
@4lun
4lun / jenkins-remote-build-trigger.md
Last active July 9, 2019 07:47
How to trigger a remote build via a URL for a Jenkins job
  1. Create new user (e.g. webhook) with the following permissions: Overall > Read, Job > Build, Job > Read & Job > Workspace. Login as the user and get their API token
  2. Under a job, enable "Trigger Builds Remotely" and set an authentication token
  3. Trigger a POST request with the following structure:

http://{USER}:{API_TOKEN}@{JENKINS_URL}/job/{JOB}/build?token={AUTHENTICATION_TOKEN}