github jenkins-zh/jenkins-cli v0.0.30

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

  • Add self upgrade support (#431) @LinuxSuRen
  • Add support to build job after saved it (#429) @LinuxSuRen
  • Add man page in homebrew (#391) @LinuxSuRen
  • Add support to trigger build and getting the build id (#434) @LinuxSuRen
  • Add timeout option for plugin upload command (#428) @LinuxSuRen
  • Add timeout option for plugin check command (#422) @LinuxSuRen

πŸ› Bug Fixes

  • Fix cannot connect jnlp agent with http proxy (#420) @LinuxSuRen

πŸ“ Documentation updates

  • Add gitbook support for jcli document (#426) @LinuxSuRen

πŸ‘» Maintenance

  • Bump github.com/onsi/ginkgo from 1.13.0 to 1.14.0 (#421) @dependabot-preview
  • Bump github.com/spf13/pflag from 1.0.3 to 1.0.5 (#432) @dependabot-preview
  • Bump github.com/AlecAivazis/survey/v2 from 2.0.7 to 2.0.8 (#427) @dependabot-preview
3 months ago