Skip to content

Instantly share code, notes, and snippets.

@ThinkerBoy
ThinkerBoy / jenkins-remote-build-trigger.md
Created January 8, 2018 08:14 — forked from 4lun/jenkins-remote-build-trigger.md
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}