dotnet-ci icon indicating copy to clipboard operation
dotnet-ci copied to clipboard

Push/PRs triggers that launch sub-jobs should pass checked out commit hash to sub-jobs

Open mmitche opened this issue 9 years ago • 0 comments

Right now it's possible that the checked out hash is different for different sub-jobs of a flow job. There are a few reasons:

  1. GitHub push events contain no info on what hash was pushed, so Jenkins can combine builds
  2. PR merger builds do a merge from the upstream branch into the PR branch and check out the latest hash there. That means an intervening push to upstream could cause sub-jobs to check out different hashes

The right way to do this is to pass the checked out hash (seen in the environment as GIT_COMMIT) from the root job to the sub jobs. In practice, I saw some issues with this where the checked out hash was incorrectly determined (GIT_COMMIT was actually the previous job's GIT_COMMIT). This could be a result of incorrect EnvInject caching or something else entirely.

mmitche avatar Jan 14 '16 21:01 mmitche