Reputation: 11
How to start Jenkins build remotely with cloudbees authentication enabled?
Please let me know the command to start it from a script or throw commang like wget/curl
Upvotes: 0
Views: 294
Reputation: 25461
You can POST
to https://accountname.ci.cloudbees.com/job/jobname/build
passing your CloudBees username (typically an email address) and Jenkins API token (see /me/configure
) for BASIC
authentication.
But if you would rather not keep your full credentials in a script, you can pick an arbitrary token and configure that in the job definition, in which case POST
ing to build?token=…
without authentication will schedule a build. In the usual case that your Jenkins instance is not visible to anonymous users, this will not work (since the whole URL space is blocked), in which case the Build Token Root plugin may be used to accomplish the same thing.
Upvotes: 1