I would like to know how to configure Bitbucket Build Status Notifier Jenkins plugin to connect to BitBucket Cloud for Pipeline projects.

Basic instructions are here, on a plugin homepage: https://plugins.jenkins.io/bitbucket-build-status-notifier/

However, following those instructions yield successful call from Jenkins like:

Sending build status INPROGRESS for commit dd4535c01718552b76d6e7f9568ad89bf2dd860b to BitBucket is done!

But on BitBucket Clould side there is no effect whatsoever.

I have tried basic call from documentation:

bitbucketStatusNotify(buildState: 'INPROGRESS')

No effect.

Then I have tried, based on this site answer (Why does the Jenkins bitbucket-build-status-notifier-plugin post the status to the shared pipeline library repository?):

           buildState: 'INPROGRESS',
           repoSlug: 'repoSlug aka repositoryName, e.g. some-app',
           commitId: env.GIT_COMMIT

Again, no effect.

Then I have tried something on my own (various variants of this):

     buildState: 'INPROGRESS',
     buildDescription: "${env.JOB_NAME}",
     buildKey: "${env.BUILD_NUMBER}",
     buildName: "${env.JOB_BASE_NAME}",
     repoSlug: "my-repo-name",//BitBucket Cloud repo name (last part of repo url)
     commitId: env.GIT_COMMIT    

And again no effect. I think there is something with data. So if I would sent "the right" data would be OK? Can someone tell me what I am doing wrong? What BitBucket Cloud API expects to get?

  • 1
    What is "Bitbucket Cloud for Pipeline"? I've never heard of this and I can't find it with a web search. Taking a couple wild guesses here, do you mean Bitbucket Pipelines (different from Jenkins Pipelines) or the Bitbucket Multibranch Pipeline plugin? – jayhendren Feb 1 at 20:36
  • Bitbucket Cloud for Pipeline is nothing. I was saying "BitBucket Cloud for Pipeline projects" so this means BitBucket Cloud for Jenkins pipeline projects. As we know Jenkins has two major options how it is ran. Via UI configuration or via pipelines via jekinsfile. I have improved title. – Peter Stegnar Feb 2 at 7:37
  • 1
    What's the error log from Jenkins? Maybe the call to bitbucket from jenkins is blocked by a firewall or something. – Akram Fares Mar 4 at 19:42
  • Nope outbound firewall is not set. I have solved this problem with direct REST API integration. Otherwise good hint! To check Jenkins log, ofc! Tnx! – Peter Stegnar Mar 6 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.