Start Jenkins Builds

Ask the Jenkins agent to run, start or rebuild Jenkins jobs. Starting a build can have real effects, like deploying software, so the agent never starts a build without your confirmation.

Ask for example:

  • Rebuild the Jenkins jobs linked to this work item.
  • Start the branch job of JJI-123.
  • Run the deploy job for this work item with ENVIRONMENT set to staging.

How it works

  1. Find the jobs. The agent looks up the jobs you asked for: the jobs linked to the work item, the jobs named after it, or a job you name. When it finds more than five jobs, it asks you to narrow the request.

  2. Confirm. The agent shows every job with its site and link, the work item, and the parameters. Then it asks for your confirmation:

    • For one job, answer with a clear yes.
    • For more than one job, name each job you want to start. A blanket “yes” or “all of them” doesn’t count, and the agent asks again. It never starts a job you didn’t name.

    Any other answer, like a question or a changed request, means nothing is started.

  3. Start. The agent starts each confirmed job on its own, so every job gets its own outcome.

  4. Report. For each job, the agent tells you whether Jenkins queued the build, or why it couldn’t be started. After a failure, it asks before it starts the remaining jobs.

Build parameters

  • Without parameters, the jobs run with their default parameters.
  • You can give parameters in your request, for example “with ENVIRONMENT set to staging”. The agent passes only the parameters you gave and shows them before you confirm. It can’t see which parameters a job has.
  • Builds with the Parameter Issue Fields of the work item aren’t started by the agent, because it can’t show you those values first. Use the Trigger a Build action on the work item for those.

Limits

  • The agent can’t stop or cancel a build. Do that in Jenkins.
  • The agent doesn’t wait for the build result. Ask for the build status of the work item later.
  • The agent never repeats a build on its own, also not after an error.

Previous: Find Jenkins Jobs
Next: Triage a Failed Build
Jenkins for Jira

Didn’t find what you were looking for?