jenkinsci / jenkinsci/git-plugin

[JENKINS-16564] Calling build.getResult after aborting a build manually (by clicking the Red cross) gives the result as "FAILURE" instead of "ABORTED"

Open
#2,221 0 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

I am trying to extend the jira plugin


  1. I am performing a post build task.

  2. I am using build.getResult() to get Result of the current build.

  3. So whenever I abort a build manually (clicking the red cross) it returns a result as "ABORTED"

But when I am configuring a job with a git repository.And I run the job and abort the build manually it returns the result as "FAILURE" instead of "ABORTED"


It is blocking me on my task as If the result is "FAILURE" the plugin performs "A" task and on "ABORTED" performs "B" task.

---
Originally reported by rupalibehera, imported from: Calling build.getResult after aborting a build manually (by clicking the Red cross) gives the result as "FAILURE" instead of "ABORTED"


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

Raw content of original issue

I am trying to extend the jira plugin


  1. I am performing a post build task.

  2. I am using build.getResult() to get Result of the current build.

  3. So whenever I abort a build manually (clicking the red cross) it returns a result as "ABORTED"

But when I am configuring a job with a git repository.And I run the job and abort the build manually it returns the result as "FAILURE" instead of "ABORTED"


It is blocking me on my task as If the result is "FAILURE" the plugin performs "A" task and on "ABORTED" performs "B" task.

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.