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

Bitbucket Server branch source no longer initiates "Posting build status of ... to Bitbucket"


      Back in version 2.1.3 of this plugin, at the start of a multibranch pipeline job after getting the Jenkinsfile on the master node (prior to actually running it on a slave node), the plugin would successfully post a build status to Bitbucket. See "new 1.txt" attachment.

      Now in version 3.0.0 of this plugin, according to the release notes there is a "lightweight checkout" option being used to get the Jenkinsfile on the multibranch pipeline jobs. I believe that this new checkout method to get the Jenkinsfile does not trigger a build status update. See "new 2.txt" attachment.

      This was first observed where we were doing manual git clones in our Jenkinsfiles because of how large a specific repo was (not Git-LFS large, just a lot of C++ files, branches, and git history). In every other job we have, we’re using some form of “checkout($class ‘GitSCM’…)”. to clone our code down to the slave nodes. The pipeline "checkout" call seems to provide us with that build status posting. I don’t think the manual git cloning ever actually provided us with the build status, rather the way the Jenkinsfile was cloned on the master at the VERY beginning of the job in your 2.1.3 plugin was the piece posting the status (as described above). With the new lightweight checkout option in 3.0.0, that build status posting only happens when we enter into the pipeline "checkout" method at some point in our job.

      We are no longer able to perform manual git clones in the Jenkinsfile and still get build statuses posted. While the workaround is to use the checkout method for those jobs as well, it was nice having the option to clone a smaller footprint with the manual option. I was trying to only fetch a shallow history for a SINGLE branch. My manual git operations seemed to clone a smaller version of the repo than the equivalent shallow clone of a single branch with the SCM checkout method.

        1. new 2.txt
          0.9 kB
        2. new 1.txt
          2 kB

            mhenschke_atlassian Martin Henschke
            j17359 Michael Steppe
            0 Vote for this issue
            4 Start watching this issue