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

Cannot using discover Tags after update to Bitbucket Server Integration 4.0.0

    • 4.1.0

      After updated Bitbucket Server Integration to new version 4.0.0 I cannot find Behavior Discover Tags so that I cannot working with Tags from the pipelines:

       

      Before update to 4.0.0 (old version 3.6.0) we still can select this option:

       

       

       

      But after update it was disappear:

       

      Please help to advise or if there's some work aroud to fix it?

      Thank you very much!

          [JENKINS-72120] Cannot using discover Tags after update to Bitbucket Server Integration 4.0.0

          Simon added a comment -

          We are using the Bitbucket Branch Source plugin, which provides the Discover Tags option.
          Just throwing it out there, as it seems to be more popular option in comparison to the Bitbucket Server Integration plugin.

          https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/

           

          Simon added a comment - We are using the Bitbucket Branch Source plugin, which provides the Discover Tags option. Just throwing it out there, as it seems to be more popular option in comparison to the Bitbucket Server Integration plugin. https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/  

          chris added a comment -

          For those of us that were depending on this feature to skip builds on a tag push this is also a problem

          chris added a comment - For those of us that were depending on this feature to skip builds on a tag push this is also a problem

          Michael Steppe added a comment - - edited

          For what it's worth, after migrating to Bitbucket Server Integration 4.0.0, my multibranch pipeline jobs lost their "Tags" tab. All tags were initially showing up in the "Branches" tab.

          But after clicking "Scan Multibranch Pipeline Now", I get output like the following:

          [Tue Nov 14 07:23:54 EST 2023] Starting branch indexing...
                ‘Jenkinsfile’ found
          head: SCMHead{'feature1'}, revision: <hash>, isMatch: true
          No changes detected: feature1 (still at <hash>)
                ‘Jenkinsfile’ found
          head: SCMHead{'feature2'}, revision: <hash>, isMatch: true
          No changes detected: feature2 (still at <hash>)

          [Tue Nov 14 07:24:08 EST 2023] Finished branch indexing. Indexing took 14 sec

          Evaluating orphaned items in MyProgram » MyJob

          Will remove 1.0.0
          Will remove 2.0.0

          Finished: SUCCESS

          The "orphaned items" being remove are my tags. Now the "Branches" tab only shows branches, there's no "Tags" tab, and there's no way in the job configuration to "Discover Tags" when using the Bitbucket Server Integration branch source.

          For reference, in old scan logs, I'd see separate logs for the branch scans and the tag scans, something like:

          [Wed Nov 08 18:02:12 EST 2023] Starting branch indexing...
           > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-494c4f29af98365ff58e13dd867f64c7/.git # timeout=10
          ... # more "> git ..." lines here

          Checking branches...

            Checking branch feature1
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: feature1 (still at <hash>)
            Checking branch feature2
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: feature2 (still at <hash>)

          Processed 2 branches

          Checking tags...

            Checking tag 1.0.0
                ‘Jenkinsfile’ found
              Met criteria
          Scheduled build for branch: 1.0.0
            Checking tag 2.0.0
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: 2.0.0 (still at <hash>)

          Processed 2 tags

          [Wed Nov 08 18:02:18 EST 2023] Finished branch indexing. Indexing took 6.3 sec

          Evaluating orphaned items in MyProgram » MyJob

          Will remove feature3

          Finished: SUCCESS

          It seems to me like the new output is more like it's printing out a Java object or something and is never going into check for tags (it actually wipes the tags that used to exist). Are tags no longer supported under this branch source plugin?

          Michael Steppe added a comment - - edited For what it's worth, after migrating to Bitbucket Server Integration 4.0.0, my multibranch pipeline jobs lost their "Tags" tab. All tags were initially showing up in the "Branches" tab. But after clicking "Scan Multibranch Pipeline Now", I get output like the following: [Tue Nov 14 07:23:54 EST 2023] Starting branch indexing...       ‘Jenkinsfile’ found head: SCMHead{'feature1'}, revision: <hash>, isMatch: true No changes detected: feature1 (still at <hash>)       ‘Jenkinsfile’ found head: SCMHead{'feature2'}, revision: <hash>, isMatch: true No changes detected: feature2 (still at <hash>) [Tue Nov 14 07:24:08 EST 2023] Finished branch indexing. Indexing took 14 sec Evaluating orphaned items in MyProgram » MyJob Will remove 1.0.0 Will remove 2.0.0 Finished: SUCCESS The "orphaned items" being remove are my tags. Now the "Branches" tab only shows branches, there's no "Tags" tab, and there's no way in the job configuration to "Discover Tags" when using the Bitbucket Server Integration branch source. For reference, in old scan logs, I'd see separate logs for the branch scans and the tag scans, something like: [Wed Nov 08 18:02:12 EST 2023] Starting branch indexing...  > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-494c4f29af98365ff58e13dd867f64c7/.git # timeout=10 ... # more "> git ..." lines here Checking branches...   Checking branch feature1       ‘Jenkinsfile’ found     Met criteria No changes detected: feature1 (still at <hash>)   Checking branch feature2       ‘Jenkinsfile’ found     Met criteria No changes detected: feature2 (still at <hash>) Processed 2 branches Checking tags...   Checking tag 1.0.0       ‘Jenkinsfile’ found     Met criteria Scheduled build for branch: 1.0.0   Checking tag 2.0.0       ‘Jenkinsfile’ found     Met criteria No changes detected: 2.0.0 (still at <hash>) Processed 2 tags [Wed Nov 08 18:02:18 EST 2023] Finished branch indexing. Indexing took 6.3 sec Evaluating orphaned items in MyProgram » MyJob Will remove feature3 Finished: SUCCESS It seems to me like the new output is more like it's printing out a Java object or something and is never going into check for tags (it actually wipes the tags that used to exist). Are tags no longer supported under this branch source plugin?

          We found to have the same issue: Tags show up under the Branches tab, trying to build and then fail, filling up our jenkins-controller with the cloned repositories. Even with new scans, the tags stay in the "Branches" tab. I don't expect this to be a feature, as this is not mentioned in the Changelog for plugin version 4.0.0. I assume it is a bug within the paged REST API calls that are now being used

          Julian Krieger added a comment - We found to have the same issue: Tags show up under the Branches tab, trying to build and then fail, filling up our jenkins-controller with the cloned repositories. Even with new scans, the tags stay in the "Branches" tab. I don't expect this to be a feature, as this is not mentioned in the Changelog for plugin version 4.0.0. I assume it is a bug within the paged REST API calls that are now being used

          Nina Marwede added a comment -

          We are also affected by this. The discovery function is broken with update to 4.0.0.

          Workaround is downgrade to 3.6.0 for now.

          Nina Marwede added a comment - We are also affected by this. The discovery function is broken with update to 4.0.0. Workaround is downgrade to 3.6.0 for now.

          Brian Cerveny added a comment -

          Is it possible to downgrade? After we upgraded to 4 and tried to return to 3.6.0, our Multibranch builds disappeared. Only non-Multibranch builds work. Did anyone else have issues with downgrading?

          Brian Cerveny added a comment - Is it possible to downgrade? After we upgraded to 4 and tried to return to 3.6.0, our Multibranch builds disappeared. Only non-Multibranch builds work. Did anyone else have issues with downgrading?

          Nina Marwede added a comment -

          As far as I saw, the settings for branch discovery within the multibranch pipelines went missing but could be restored manually. So downgrade is possible but might be difficult depending on features used.

          Nina Marwede added a comment - As far as I saw, the settings for branch discovery within the multibranch pipelines went missing but could be restored manually. So downgrade is possible but might be difficult depending on features used.

          Rasmus Voss added a comment -

          Do we know a workaround or fix  ?
          We tried using the regular expression feature but that still triggers on tags, so it seems the plugin know about branches and tags. i.e.

          If I set up the regular expression to skip branches that looks like tags then it still triggers on tags like 1.2.3.4 but not on a branch named 1.2.3.4

          So if somebody has  workaround, please reach out

          Rasmus Voss added a comment - Do we know a workaround or fix  ? We tried using the regular expression feature but that still triggers on tags, so it seems the plugin know about branches and tags. i.e. If I set up the regular expression to skip branches that looks like tags then it still triggers on tags like 1.2.3.4 but not on a branch named 1.2.3.4 So if somebody has  workaround, please reach out

          Juergen added a comment -

          As mentioned in comment from manligheten we also use https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/ It's pretty mature and works like a charm.

          Juergen added a comment - As mentioned in comment from manligheten we also use https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/ It's pretty mature and works like a charm.

          Dyon added a comment -

          Bug has been looked into. Draft PR for it can be found here: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/pull/436

          Please provide any feedback if possible

          Thanks for your patience. 

          Dyon added a comment - Bug has been looked into. Draft PR for it can be found here: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/pull/436 Please provide any feedback if possible Thanks for your patience. 

            dgeorgopoulos Dyon
            phamtuananhvn Tuan Anh
            Votes:
            14 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: