-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
github-branch-source: 1.7
branch-api: 1.8
Issue
Github webhook triggers a pipeline but 'checkout scm' just polls the latest commit. There is no guarantee the triggered build is going to use the same commit SHA.
It would be great to have some way to access commit SHA value of the webhook payload in the Jenkinsfile so that the build can use the same commit SHA as webhook payload.
Current Status
I noticed there is a Contributor: https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/BranchNameContributor.java
I believe a COMMIT_ID could be added.