Jenkins · Arazzo Workflow
Jenkins Trigger a Build and Await the Result
Version 1.0.0
Trigger a parameterless job, watch it leave the queue, and poll the build until it finishes.
View Spec
View on GitHub
AutomationBuild ServerCI/CDContinuous DeliveryContinuous IntegrationDevOpsOpen SourceRemote Access APIArazzoWorkflows
Provider
Workflows
trigger-build-and-await-result
Trigger a Jenkins job and block until the resulting build completes.
Reads the job to capture nextBuildNumber, triggers the build, confirms the queue accepted it, and polls the build until building is false. Note that nextBuildNumber is the number this build receives provided no other client triggers the same job concurrently; on busy shared jobs, follow the queue item URL returned in the trigger Location header instead.
1
resolveJob
getJob
Read the job to confirm it exists, that it is buildable, and to capture the number the next build will be assigned.
2
triggerBuild
triggerBuild
Post the build trigger for the parameterless job. Jenkins responds 201 with a Location header pointing at the newly created queue item.
3
inspectQueue
getQueue
Read the build queue to confirm the trigger was accepted and to see whether the build is still waiting for an executor.
4
awaitBuild
getBuild
Poll the build resource until Jenkins reports it is no longer building, then capture the final result. Retries allow time for the build to leave the queue, start on an executor, and run to completion.