github jenkins-zh/jenkins-cli v0.0.30

latest releases: v0.0.42, v0.0.41, v0.0.40...
3 years ago

What’s Changed

For many uses who want to integrate Jenkins into their own platform, they might meet a problem. How can I get the build ID after I triggered a job?

In order to have a better understanding about it. I guess you need to know the mechanism of Jenkins schedule. If a job was triggered, Jenkins will create a task in the waiting queue, once there is a appropriate agent is ready for it, then Jenkins will schedule it to that agent.

In another word, it's a asynchronous process. So you cannot get the build id immediately, because it has not started.

There's my offer. Install plugin Pipeline restFul API v0.9 on your Jenkins, upgrade Jenkins CLI to v0.0.30. Then take the following command:

jcli job build job/devops/ -b --wait --columns Number --no-headers

The output is 36.

🚀 Features

🐛 Bug Fixes

📝 Documentation updates

👻 Maintenance

Don't miss a new jenkins-cli release

NewReleases is sending notifications on new releases.