github-plugin icon indicating copy to clipboard operation
github-plugin copied to clipboard

Support aborted build status reporting

Open KevinPike opened this issue 8 years ago • 5 comments

This pull request supports reporting aborted builds to Github as errors. Currently, aborted builds use the default status which is pending. This can be confusing for automated tools.

This change is Reviewable

KevinPike avatar Jul 27 '16 21:07 KevinPike

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b82a666). Click here to learn what that means.

@@            Coverage Diff            @@
##             master     #133   +/-   ##
=========================================
  Coverage          ?   74.64%           
=========================================
  Files             ?       62           
  Lines             ?     1341           
  Branches          ?      141           
=========================================
  Hits              ?     1001           
  Misses            ?      296           
  Partials          ?       44
Impacted Files Coverage Δ
...va/com/coravy/hudson/plugins/github/GithubUrl.java 92.3% <ø> (ø)
...ugins/github/internal/GHPluginConfigException.java 0% <ø> (ø)
...nsci/plugins/github/admin/RespondWithRedirect.java 0% <ø> (ø)
...insci/plugins/github/admin/RequireAdminRights.java 0% <ø> (ø)
...sci/plugins/github/util/misc/NullSafeFunction.java 100% <100%> (ø)
...org/jenkinsci/plugins/github/admin/GHRepoName.java 100% <100%> (ø)
...ins/github/status/sources/misc/AnyBuildResult.java 100% <100%> (ø)
...hub/status/sources/AnyDefinedRepositorySource.java 100% <100%> (ø)
...hub/status/sources/DefaultCommitContextSource.java 100% <100%> (ø)
...ins/github/extension/status/GitHubReposSource.java 100% <100%> (ø)
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b82a666...3c17e14. Read the comment docs.

codecov-io avatar Jul 27 '16 21:07 codecov-io

does jenkins call publishers on aborted build? Don't think so.

lanwen avatar Aug 04 '16 13:08 lanwen

does jenkins call publishers on aborted build? Don't think so.

No, it doesn't. AFAIK

KostyaSha avatar Aug 04 '16 13:08 KostyaSha

The behavior that I'm seeing that is when a build starts, a pending github commit status is created. When the build is aborted, another pending github commit status is created. I believe that second status is pending because it is the default status. It does appear that the github plugin is getting called for an aborted build.

KevinPike avatar Aug 09 '16 21:08 KevinPike

please provide a test to reproduce (you can find examples with mocked github in tests for notifier)

lanwen avatar Aug 10 '16 09:08 lanwen