We have a corporate Bitbucket Cloud team set up with all of our access mediated by Okta. I would like to connect the Jenkins Multibranch Pipeline plugin to our Bitbucket repositories as described here: https://support.cloudbees.com/hc/en-us/articles/115000051132-How-to-Trigger-Multibranch-Jobs-from-BitBucket-Cloud-
We have created a separate automation account in our organization, with an associated Okta identity. I have configured MFA for both Okta and Bitbucket as required by the Bitbucket-Okta integration. This is, for all intents and purposes, a full-fledged Bitbucket account with all the same access as my developer account.
I have followed the aforementioned guide to the letter, creating credentials in Jenkins with the automation account's username and password. However, when I attempt to run the pipeline, and the plugin attempts to scan our target repository, it receives a 401 HTTP response from the Bitbucket API endpoint.
Has anyone managed to accomplish this integration, and if so, how did you do so? The end goal of this is to enable Jenkins build status updates to feed back into comments of the PR that triggered it (and other neat review/tracking features).
Instead of doing a repository scan, may I recommend that you try setting up the Generic Webhook Trigger Plugin ?
At the moment I think that it is the best way to tell Jenkins to run a job. In each webhook payload from Bitbucket Cloud there will be a commit id. Extract that commit id, put it in an environment variable and then use it as the 'branch source' for the git checkout at the start of your build.
Then at the end of each build, you can use the Bitbucket Cloud build status notifier plugin to add feed back to pull requests (including direct links to green and red builds). Unlike the trigger step, this plugin will require OAuth credentials.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events