manu endla
manu endla

Reputation: 301

Know the Jenkins build status of a build with particular build number

Using Jenkins groovy API how to know the status of a build whether it's success or failure .

I have a job in https://localhost.com/Jenkins/Mano/Dev/parallel/123

Where parallel is the job name and 123 is its build number . And the job is residing inside Mano/Dev folder .

I'd like to know the status of the Job with build number 123 .

Is there any direct API call to find the status

Any help is highly appreciated .

Thanks

Upvotes: 1

Views: 1610

Answers (1)

dge
dge

Reputation: 3075

Jenkins got a REST api, if you open your jobs page, select your build, visit the REST api link in the bottom right. Its quite self explanatory, i.e. to get the result in json: http://<junkins url>/job/<job name>/<build #>/api/json?tree=result

Upvotes: 2

Related Questions