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

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

      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.

          [JENKINS-63510] Declarative pipeline is sending build status multiple times to Bitbucket cloud via notifier plugin

          Ravindra Kumar created issue -
          Ravindra Kumar made changes -
          Description Original: 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'])

           

          Please suggest if we are missing anything here.
          New: 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.
          Ravindra Kumar made changes -
          Summary Original: Declarative pipeline is sending build status multiple times to to Bitbucket cloud New: Declarative pipeline is sending build status multiple times to Bitbucket cloud via notifier plugin
          Alexey Vazhnov made changes -
          Description Original: 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.
          New: 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 - 

          {noformat}
           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!
          {noformat}

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

          {code:groovy}
          @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>
          {code}

          script used is -

          {code:groovy}
          bitbucketStatusNotify(buildState: 'INPROGRESS', commitId: 'xxxxxxxxxxxx', repoSlug: 'yyyyyy')
          {code}

          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: