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

Cannot Retrieve Commit Hashes when Using Multiple Get Repositories

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: multiple-scms-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.656, Ubuntu 14.04, Multiple SCM Plugin version 0.7-SNAPSHOT, 9e61a8d
    • Similar Issues:

      Description

      I need to access the Git commit hash for each of my 4 multiple Git repositories configured using the Multiple SCMs Plugin. Each repository is also configured to trigger the build. I need to ensure that my build is triggered using the exact same versions of the repository from the point that Jenkins triggered the build.

      When I run env inside my Build Script Task, I see GIT_URL_1 through GIT_URL_4, but only one GIT_COMMIT (even after PR#19, I just GIT_COMMIT and GIT_COMMIT_1).

      What's worse, GIT_COMMIT is neither from Repository 1 nor Repository 4... it seems to consistently be from Repository 3. I am not sure if this will actually remain consistent, so my commit hash is effectively useless.

      The expected result is to see the latest hash from each repository, numbered according to the GIT_URL_* numbering. Thanks for taking a look, and I'm happy to provide any needed information.

        Attachments

          Activity

          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
          Hide
          rthurner rupert je thurner added a comment -

          can you elaborate where this is documented in the pipeline plugin? i saw:

          https://stackoverflow.com/questions/40224272/using-a-jenkins-pipeline-to-checkout-multiple-git-repos-into-same-job

           

          Show
          rthurner rupert je thurner added a comment - can you elaborate where this is documented in the pipeline plugin? i saw: https://stackoverflow.com/questions/40224272/using-a-jenkins-pipeline-to-checkout-multiple-git-repos-into-same-job  

            People

            • Assignee:
              kbell Kevin Bell
              Reporter:
              wbuckner Will Buckner
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: