jenkinsci / jenkinsci/git-plugin
[JENKINS-27570] Add environment variable for last successful build commit
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
I have a build script that uses the last commit to find out which files have changed and perform code style analysis on those files alone. Running across the entire code base is infeasible (as it is too large and hangs).
However, there's no easy way to get the last commit that was built successfully for the current branch. Is it possible to add a GIT_PREVIOUS_COMMIT_SUCCESSFUL environment variable?
---
Originally reported by drugcrazed, imported from: Add environment variable for last successful build commit
Raw content of original issue
I have a build script that uses the last commit to find out which files have changed and perform code style analysis on those files alone. Running across the entire code base is infeasible (as it is too large and hangs).
However, there's no easy way to get the last commit that was built successfully for the current branch. Is it possible to add a GIT_PREVIOUS_COMMIT_SUCCESSFUL environment variable?
environment
```
Jenkins Git: 2.3.5
Jenkins: 1.604
```
Contributor guide
Assessment
This issue has not been assessed yet.