GitSCM checkout returns same values on second different call

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • git plugin 4.7.0

      Hi,

      if I run within a pipeline job, the checkout command twice to checkout different commits, the returnvalue of this call has two times the same values, even if the branches and commits are different.

      E.g:

      def scm1 = checkout (changelog: false, poll: false, verboseEnabled: false, scm: [$class: 'GitSCM',
      branches: [[name: 'refs/tags/TAG1']], ....)

      def scm2 = checkout (changelog: false, poll: false, verboseEnabled: false, scm: [$class: 'GitSCM',
      branches: [[name: 'refs/tags/TAG2']], ...)

      the Maps scm1 and scm2 contain the same values, even if the tags are on different commits.

      And the values are always from the first checkout .

      So how can I get such values from the second checkout?

       Note that this problem is specific to performing multiple checkouts from the same repository with different SHA1 hashes in the same Pipeline job. If different repositories are used in the same Pipeline job, refer to JENKINS-39968.

            Assignee:
            Ramon Leon
            Reporter:
            Bernd Spickers
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: