Posted in Devops, Information Technology

Jenkins Cheat Sheet


# Print name of all known jobs
GET /api/json?tree=jobs[name]&pretty=true

# Enable a job
POST /job/enable

# Run job without parameters
POST /<name>/build

# Run job with parameters
POST /<name>/buildWithParameters?<params>

List all job paths

Jenkins.instance.getAllItems(AbstractItem.class).each {

Dump Plugin Versions

  plugin -> 

Tracking builds

Jenkins 1.x

  1. First get the queue number return by the POST that started the call
  2. Wait some seconds! Yes, honestly!
  3. Fetch the build id using
    GET /<job name>/lastBuild/buildNumber
  4. Once you have the build id poll the status with
    GET /<job name>//api/json


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s