2

I followed the instructions given in the CloudBees documentation, but my git pushes (at Bitbucket) did not trigger new builds in Jenkins. Roughly,

  1. In Jenkins, create a new build project, and select "Trigger builds remotely".
  2. Generate an authentication token, then save the project.
  3. Obtain API token at https://<account>.ci.cloudbees.com/user/<your-email>/configure
  4. In Bitbucket, add a Jenkins service with the following options
    • Endpoint: https://<your-email>:<apitoken>@<account>.ci.cloudbees.com
    • Token: <from-step-2>
James Lim
  • 12,915
  • 4
  • 40
  • 65

1 Answers1

2

The documentation is probably outdated.

At the "People" section in Jenkins, it appears that there are two users, one named "user", and another named "user@domain.com" (where "user" and "domain" are replaced appropriately by components in your email address.) When I created the build project, it was created under "user", and so "user@domain.com" did not have the rights to trigger a build.

Thus, the correct endpoint should be

https://<the-user-portion-of-your-email>:<apitoken>@<account>.ci.cloudbees.com

Note that the api token should be obtained from

https://<account>.ci.cloudbees.com/user/<the-user-portion-of-your-email>/configure
James Lim
  • 12,915
  • 4
  • 40
  • 65
  • Note that in the case where your user name IS your email address, you must urlencode your email address, so the resulting url will be something like http://test.user%40example.com:@.ci.cloudbees.com – Chris Lawlor Sep 24 '13 at 21:16
  • Is token (in bitbucket's dlg) and apitoken the same? What is module? – Jirka May 04 '14 at 19:05
  • @ChrisLawlor So you mean one should add the whole (url encoded) email, not just ? – Jirka May 04 '14 at 19:06