Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #76 from abayer/jenkins-40239
[JENKINS-40239] Add descriptions for build conditions
  • Loading branch information
abayer committed Dec 20, 2016
2 parents b7ad371 + e047542 commit a1963cd
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 0 deletions.
Expand Up @@ -41,5 +41,10 @@ public class Aborted extends BuildCondition {
return r.getResult() != null && r.getResult().equals(Result.ABORTED)
}

@Override
public String getDescription() {
return Messages.Aborted_Description()
}

public static final long serialVersionUID = 1L
}
Expand Up @@ -40,6 +40,11 @@ public class Always extends BuildCondition {
return true
}

@Override
public String getDescription() {
return Messages.Always_Description()
}

public static final long serialVersionUID = 1L

}
Expand Up @@ -59,6 +59,12 @@ public class Changed extends BuildCondition {
}
}

@Override
public String getDescription() {
return Messages.Changed_Description()
}


public static final long serialVersionUID = 1L

}
Expand Up @@ -41,5 +41,10 @@ public class Failure extends BuildCondition {
return r.getResult() != null && r.getResult().equals(Result.FAILURE)
}

@Override
public String getDescription() {
return Messages.Failure_Description()
}

public static final long serialVersionUID = 1L
}
Expand Up @@ -41,5 +41,10 @@ public class Success extends BuildCondition {
return r.getResult() == null || r.getResult().isBetterOrEqualTo(Result.SUCCESS)
}

@Override
public String getDescription() {
return Messages.Success_Description()
}

public static final long serialVersionUID = 1L
}
Expand Up @@ -41,5 +41,10 @@ public class Unstable extends BuildCondition {
return r.getResult() != null && r.getResult().equals(Result.UNSTABLE)
}

@Override
public String getDescription() {
return Messages.Unstable_Description()
}

public static final long serialVersionUID = 1L
}
Expand Up @@ -46,6 +46,8 @@ public abstract class BuildCondition implements Serializable, ExtensionPoint {

public abstract boolean meetsCondition(WorkflowRun r);

public abstract String getDescription();

/**
* All the registered {@link BuildCondition}s.
*
Expand Down
@@ -0,0 +1,30 @@
#
# The MIT License
#
# Copyright (c) 2016, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

Aborted.Description=Run when the build status is "Aborted"
Always.Description=Always run, regardless of build status
Changed.Description=Run if the current build's status is different than the previous build's status
Failure.Description=Run if the build status is "Failure"
Success.Description=Run if the build status is "Success" or hasn't been set yet
Unstable.Description=Run if the build status is "Unstable"

0 comments on commit a1963cd

Please sign in to comment.