jenkinsci / pipeline-github-plugin

Pipeline: GitHub
https://plugins.jenkins.io/pipeline-github/
MIT License
159 stars 73 forks source link

Configure whether UNSTABLE builds should mark commit status as failed or not #98

Closed meetmangukiya closed 3 years ago

meetmangukiya commented 3 years ago

Feature Request

Currently, I think the case is that if the tests reported have more than one failures, the buildResult gets set to UNSTABLE which is expected behavior. However, the current behavior seems to be that UNSTABLE builds mark the commit status as failed which I don't think is completely in line with the idea of UNSTABLE, UNSTABLE should be tolerable, test failures should be tolerable. Compilation / build failures shouldn't be tolerable and should FAIL the builds. So, maybe a way to configure if UNSTABLE builds should fail the commit status or not?

Currently, only way to prevent this is skip reporting which is not quite ideal.

P.S.: I am not sure if this is correct plugin for the ticket

meetmangukiya commented 3 years ago

This is not the correct plugin. https://github.com/jenkinsci/github-branch-source-plugin is where setting of github commit status happens. I have created an extension that overrides the default behavior to allow marking unstable builds as success - https://github.com/meetmangukiya/github-scm-trait-notification-context-unstable-commit-plugin