0

Can the build method in groovy return the build ID and build status when the job has completed ? For example if I write a code like this:

Object buildData = build(job: 'xyz', parameters: [....])

What all things can I fetch from buildData Object ? Currently I have a need to fetch build ID and build status

Aayush
  • 133
  • 1
  • 3
  • 11

1 Answers1

0

The build method returns an Object of Class RunWrapper: org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper

All the methods that can be used using this object are present here: https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html

Aayush
  • 133
  • 1
  • 3
  • 11
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 06 '21 at 07:49