Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33276

Build status is not being set for parameterized repositories

XMLWordPrintable

      The plugin doesn't set the status:

      According to the job log - everything is fine:

      Sending build status INPROGRESS for commit 915809121478ace3d92e52bbb2769f03f26cbfa9 to BitBucket is done!
      Sending build status SUCCESSFUL for commit 915809121478ace3d92e52bbb2769f03f26cbfa9 to BitBucket is done!
      

      Plugin log:

      Mar 02, 2016 6:23:46 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier prebuild
      Bitbucket notify on start
      Mar 02, 2016 6:23:46 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus
      This response was received:
      Mar 02, 2016 6:23:47 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier prebuild
      Bitbucket notify on start succeeded
      Mar 02, 2016 6:23:47 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier perform
      Bitbucket notify on finish
      Mar 02, 2016 6:23:47 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus
      This response was received:
      Mar 02, 2016 6:23:48 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier perform
      Bitbucket notify on finish succeeded
      

      Using CURL requests to api with the same credentials I'm able to set the status:
      REQUEST:

      curl -X POST https://api.bitbucket.org/2.0/repositories/myteam/myrepo.git/commit/9186237941862379481679236178237/statuses/build -H "Authorization: Bearer HkG8WeMRte2C2vx3CL8SwE7gO8_086612391486231486723617991_g==" -d state=SUCCESSFUL -d key=JENKINS-BUILD-50 -d url=https://cicd.myrepo.ru/job/myrepo/
      

      RESPONSE:

      {"name": "", "links": {"commit": {"href": "https://api.bitbucket.org/2.0/repositories/myteam/myrepo/commit/9186237941862379481679236178237"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/myteam/myrepo/commit/9186237941862379481679236178237/statuses/build/JENKINS-BUILD-50"}}, "url": "https://cicd.myrepo.ru/job/myrepo/", "state": "SUCCESSFUL", "created_on": "2016-03-02T14:46:06.740794+00:00", "key": "JENKINS-BUILD-50", "updated_on": "2016-03-02T14:48:41.267025+00:00", "type": "build", "description": ""}
      

            flagbit Antonio Mansilla
            zerthimon Lior Goikhburg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: