Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose status which abort the flow build. #59

Closed
wants to merge 0 commits into from

Conversation

ueberhammDesign
Copy link

You can choose the status (Success, Unstable or Failure), which abort the flow build. It also contains, that the build can not be 'better' than any build inside the flow build.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@@ -201,7 +202,8 @@ public class FlowDelegate {
* Check flow status and stop if unexpected failure is detected
*/
private void statusCheck() {
if (flowRun.state.result.isWorseThan(SUCCESS)) {
if (flowRun.state.result.isWorseThan(Result.fromString(flowRun.getAbortWhenWorseThan()))) {
println("Abort execution, because on of the last builds is worse than " + flowRun.getAbortWhenWorseThan())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: on -> one

@dnozay
Copy link
Member

dnozay commented Sep 11, 2015

awesome that there are tests! 👍 please rebase and make sure that the feature is opt-in only. thanks a lot.

<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<div>
<div>
Abort the build, when one single step in the build process is worster than your value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worse

@dnozay
Copy link
Member

dnozay commented Sep 11, 2015

once you are done with your changes, I would also appreciate if you could squash relevant changes together. thank you!

@ueberhammDesign
Copy link
Author

All changes squashed together.

@@ -26,7 +26,7 @@
package com.cloudbees.plugins.flow

import hudson.AbortException
import hudson.console.HyperlinkNote
import hudson.console.ModelHyperlinkNote
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't look right. did you squash commits that were already merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants