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

Multiple SCMs Git repositories checks out wrong SHA.

    Details

    • Similar Issues:

      Description

      In my Jenkins job, I need to build from 3 GIT repositories hence, I use the multiple SCMs plugin. For each repository, the Branch Specifier is a String Parameter defaulting to */master. Name and Refspec parameters under each repository are blank.

      All is fine (i.e. using the default) until I run a specific build with say a TAG or a SHA for any one of the repositories as the Branch Specifier. From that point forward, even though the Branch Specifier defaults back to */master, the same SHA is checked out every time.

      Initially the Additional Behaviour → Clean before checkout was selected. I changed this to Wipe out repository & force clone but to no avail.

      I also noticed previously that this messed up Poll SCM build trigger in that it caused a build to happen even though all the SHAs from the previous build were unchanged and we ended up having a build every hour 24 hours a day until Poll SCM was dropped.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          The multiple SCM's plugin has a number of unfortunate interactions with the git plugin (and other SCM plugins). It is unlikely those issues will be fixed any time soon.

          You may want to evaluate using a pipeline definition to checkout multiple repositories into a single workspace. I'm sure there are still issues in that workflow, but it is receiving much more attention than the multiple SCM plugin. Refer to the multiple SCMs section of the workflow scm step plugin README.

          Show
          markewaite Mark Waite added a comment - The multiple SCM's plugin has a number of unfortunate interactions with the git plugin (and other SCM plugins). It is unlikely those issues will be fixed any time soon. You may want to evaluate using a pipeline definition to checkout multiple repositories into a single workspace. I'm sure there are still issues in that workflow, but it is receiving much more attention than the multiple SCM plugin. Refer to the multiple SCMs section of the workflow scm step plugin README .
          Hide
          rodrigc Craig Rodrigues added a comment -

          Suggest that you migrate to Pipeline plugin, which offers a supported way of checking out from multiple scms
          https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin

          Show
          rodrigc Craig Rodrigues added a comment - Suggest that you migrate to Pipeline plugin, which offers a supported way of checking out from multiple scms https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin

            People

            • Assignee:
              Unassigned
              Reporter:
              jks3 Joe Kennedy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: