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

Declarative pipeline is sending build status multiple times to Bitbucket cloud via notifier plugin

XMLWordPrintable

      We are using dynamic shared libraries in our declarative pipeline and using bitbucketStatusNotify() function to send progress of the pipeline back to Bitbucket cloud. Whenever pipeline gets triggered , it sends  the same message thrice - 

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

      It does same for successful and failed messages also. Our Jenkinsfile looks like as follows - 

      @Library('common-jenkins-shared-library') _
       library identifier: 'jenkins-shared-library@master', changelog:false, retriever: modernSCM(
       [$class: 'GitSCMSource',
       remote: 'URL',
       credentialsId: 'credntials'])
      
       <Groovy function here which is calling the pipeline>
      

      script used is -

      bitbucketStatusNotify(buildState: 'INPROGRESS', commitId: 'xxxxxxxxxxxx', repoSlug: 'yyyyyy')
      

      Please suggest if we are missing anything here.

            amansilla Antonio Mansilla
            ravindra_kumar2020 Ravindra Kumar
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: