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

Bitbucket Notifier posts duplicate on pull request


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • jenkins 2.346.3
      bitbucket-build-status-notifier 1.4.2
      Bitbucket Oath Plugin 0.12

      We have pipeline jobs, triggered by creation or update of pull requests. On each stage , we want to post the stage update and indicate the build job is "INPROGRESS". At the end of the build job, we post success or failure using post steps. The problem I have seen is it posts both the build number and the build name even though I only use the buildName parameter to declare it use BUILD_DISPLAY_NAME (see screenshots)

      Example of INPROGRESS 
      buildName "${CODE_VERSION}"
      def Result = currentBuild.getCurrentResult()+" Duration "+currentBuild.durationString.replace(' and counting', '') 
       bitbucketStatusNotify(buildState: 'INPROGRESS', buildKey: 'Build', repoSlug: "${BB_REPO}",commitId: "${GIT_REVISION}", buildName: "${BUILD_DISPLAY_NAME}", buildDescription: "Stage "STAGE_NAME" "+Result)

      Example of SUCCESSFUL: 
      bitbucketStatusNotify(buildState: "SUCCESSFUL", buildKey: 'Build',  repoSlug: "${BB_REPO}",commitId: "${GIT_REVISION}" , buildName: "${BUILD_DISPLAY_NAME}" ,buildDescription: "${BUILD_DISPLAY_NAME} was "currentBuild.getCurrentResult()" Duration "+currentBuild.durationString.replace(' and counting', '') )



      We need to resolve this as we want to start auto merging using merge checks. Please let me know if more information is needed. 

            flagbit Antonio Mansilla
            hrechek Heidi Rechek
            0 Vote for this issue
            1 Start watching this issue