jenkinsci / jenkinsci/git-plugin

[JENKINS-59210] Build exactly the commit from the webhook

Open
#3,464 8 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

We need to make sure that commit SHA that triggered the build via webhook is the same SHA that the repo is being checkout out.

Use case:

Dev-1 merges changes to repo 'a'. Within seconds, Dev-2 merges changes to repo 'a'.

Expectation:

Each commit triggers a separate build based on the webhook SHA that triggered the build.

Current result:

SHA of Jenkinsfile might be not the same as checkout code, since the merges might happen within seconds of each other.

---
Originally reported by varsho, imported from: Build exactly the commit from the webhook


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

We need to make sure that commit SHA that triggered the build via webhook is the same SHA that the repo is being checkout out.

Use case:

Dev-1 merges changes to repo 'a'. Within seconds, Dev-2 merges changes to repo 'a'.

Expectation:

Each commit triggers a separate build based on the webhook SHA that triggered the build.

Current result:

SHA of Jenkinsfile might be not the same as checkout code, since the merges might happen within seconds of each other.

environment

```
Jenkins ver. 2.121.3

- [git, '3.8.0']

- [git-client, '2.7.1']

- [git-server, '1.7']

- [github, '1.29.0']

- [github-api, '1.90']

- [github-branch-source, '2.3.3']

- [github-organization-folder, '1.6']
```

1 attachment

- [Screen Shot 2019-09-04 at 5.24.18 PM.png](https://issues.jenkins.io/secure/attachment/48620/Screen%20Shot%202019-09-04%20at%205.24.18%20PM.png)
> ![Screen Shot 2019-09-04 at 5.24.18 PM.png](https://issues.jenkins.io/secure/attachment/48620/Screen%20Shot%202019-09-04%20at%205.24.18%20PM.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.