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

Multibranch pipeline displays SCM views multiple times

      When using extended SCM configuration with multibranch pipeline plugin then SCM views, all the links and revision info is shown twice on the build view.

      Here is the SCM configuration

      def teamName = 'team'
      def repoName = 'repo'
      
      stage 'Checkout'
      checkout([
          $class: 'GitSCM',
          branches: [[name: env.BRANCH_NAME]],
          browser: [
              $class: 'BitbucketWeb',
              repoUrl: "https://bitbucket.org/${teamName}/${repoName}.git"
          ],
          doGenerateSubmoduleConfigurations: false,
          extensions: [[$class: 'CleanBeforeCheckout']],
          submoduleCfg: [],
          userRemoteConfigs: [[
              credentialsId: 'jenkins_bitbucket_ssh',
              name: 'origin',
              url: "git@bitbucket.org:${teamName}/${repoName}.git"
          ]]
      ])
      

      ... and for the provided configuration all the SCM info is duplicated as shown in the provided attachment scm_extended_dups.png.

      If using the configuration as the following one

      stage 'Checkout'
      checkout scm
      

      ... then SMC information is displayed only once (scm_simple.png) as expected.

          [JENKINS-35475] Multibranch pipeline displays SCM views multiple times

          Sergey Zhemzhitsky created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171775 ] New: JNJira + In-Review [ 184466 ]

          Brian Sipos added a comment -

          I think I see the same issue but due to different config. I use SVN as repository and have a multibranch-detected Jenkinsfile with a simple "checkout scm" step that also shows up with duplicated job change entries (exactly two as seen in this original ticket). I can attach screenshot of my views if it helps.

          Brian Sipos added a comment - I think I see the same issue but due to different config. I use SVN as repository and have a multibranch-detected Jenkinsfile with a simple "checkout scm" step that also shows up with duplicated job change entries (exactly two as seen in this original ticket). I can attach screenshot of my views if it helps.

          Zach Swanson added a comment -

          Same problem. I suspect that this is due to the 'checkout scm' step being run on the master node, where the multibranch indexing is occurring - as noted in JENKINS-33273

          Zach Swanson added a comment - Same problem. I suspect that this is due to the 'checkout scm' step being run on the master node, where the multibranch indexing is occurring - as noted in JENKINS-33273

          Jesse Glick added a comment -

          Pretty sure this is a duplicate.

          Jesse Glick added a comment - Pretty sure this is a duplicate.
          Jesse Glick made changes -
          Component/s New: git-plugin [ 15543 ]
          Component/s Original: workflow-multibranch-plugin [ 21465 ]
          Assignee Original: Manuel Recena Soto [ recena ]
          Labels New: multibranch
          Stephen Connolly made changes -
          Labels Original: multibranch New: multibranch scm-api-tidy-scrub
          Stephen Connolly made changes -
          Labels Original: multibranch scm-api-tidy-scrub New: multibranch scm-api-tidy
          Stephen Connolly made changes -
          Link New: This issue relates to JENKINS-41830 [ JENKINS-41830 ]
          Stephen Connolly made changes -
          Assignee New: Stephen Connolly [ stephenconnolly ]

            stephenconnolly Stephen Connolly
            szhem Sergey Zhemzhitsky
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: