![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Affects Versions:
|
current |
|
Assignee:
|
vjuranek
|
|
Components:
|
core, groovy |
|
Created:
|
06/Nov/12 8:57 PM
|
|
Description:
|
It is currently not possible to cancel an ongoing build from a Groovy script.
The feature is exposed in the UI where the user can cancel an ongoing build. This marks the build as ABORTED and stops the build immediately without processing any more build actions.
Currently it is only possible from a Groovy script to either (1) interrupt the executor (but that marks the jobs a failed despite the arguments) or (2) mark a job aborted (but all build actions a processed).
(1)
build.getExecutor().interrupt(Result.ABORTED)
- This will mark the build failed, even if the API suggests something different.
(2)
build = Thread.currentThread().executable
build.setResult(Result.ABORTED)
|
|
Project:
|
Jenkins
|
|
Priority:
|
Major
|
|
Reporter:
|
Dirk Thomas
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|