jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-65693] Config for making UNSTABLE builds not fail commit
- Dominant language
- Java
- Stars
- 217
- Forks
- 398
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
For jenkins build where tests are reported and the build gets marked UNSTABLE, currently there is no way(as far as my research goes) to override this so that the commit status that gets reported back to github is success and not failure / error.
Overriding by setting `currentBuild.result` to `SUCCESS` doesn't work because `SUCCESS < UNSTABLE` and we could only make it higher, so only reset it to `UNSTABLE` or `FAILURE`. I believe overriding this way is not really ideal anyway. So, a config that allows the user to select how to map `UNSTABLE` to commit status would be helpful.
Currently the only option is to stop reporting which is not really ideal because we would give up all the insights, historical tracking, and also cannot view test results in the UI without reporting.
---
Originally reported by meetmangukiya, imported from: Config for making UNSTABLE builds not fail commit
Raw content of original issue
For jenkins build where tests are reported and the build gets marked UNSTABLE, currently there is no way(as far as my research goes) to override this so that the commit status that gets reported back to github is success and not failure / error.
Overriding by setting `currentBuild.result` to `SUCCESS` doesn't work because `SUCCESS < UNSTABLE` and we could only make it higher, so only reset it to `UNSTABLE` or `FAILURE`. I believe overriding this way is not really ideal anyway. So, a config that allows the user to select how to map `UNSTABLE` to commit status would be helpful.
Currently the only option is to stop reporting which is not really ideal because we would give up all the insights, historical tracking, and also cannot view test results in the UI without reporting.
Contributor guide
Assessment
This issue has not been assessed yet.