Using the multibranch source plugin with github and pipelines, I notice that the commit from the github PR will sometimes be merged with remotes/origin/master and that merge commit is what GIT_COMMIT is set to which is what built and tested. I.e.:
> git fetch --no-tags --progress https://github.com/foo/bar.git > +refs/pull/123/head:refs/remotes/origin/PR-123 > +refs/heads/master:refs/remotes/origin/master # timeout=10 Merging remotes/origin/master commit 33a67667a8944137ab8fb36e82cf56c98f84a40a into PR head commit 770d0ad5a3f34254702d34ef880f1502617e5888 Merge succeeded, producing efcd704e69f7ff30388067d2a99eeee9ea49d644 Checking out Revision efcd704e69f7ff30388067d2a99eeee9ea49d644 (PR-123) GIT_COMMIT is then set to efcd704e69f7ff30388067d2a99eeee9ea49d644. But in one of my pipeline steps I need to know the original PR commit sha, which is 770d0ad5a3f34254702d34ef880f1502617e5888 in this case. Is that exposed in any way during a pipeline step? Cheers, b. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/768473199138748efa64c2654a08bf874b9551ed.camel%40interlinx.bc.ca. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: This is a digitally signed message part
