Skip to content

Commit

Permalink
fixed cause condition
Browse files Browse the repository at this point in the history
[FIXES JENKINS-31604]
  • Loading branch information
daspilker committed Nov 20, 2015
1 parent 7c00084 commit 582c9c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/Home.md
Expand Up @@ -26,6 +26,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
[Migration](Migration#migrating-to-141)
* Enhanced support for the [Run Condition Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Run+Condition+Plugin)
([JENKINS-31581](https://issues.jenkins-ci.org/browse/JENKINS-31581))
* Fixed support for the [Run Condition Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Run+Condition+Plugin)
([JENKINS-31604](https://issues.jenkins-ci.org/browse/JENKINS-31604))
* 1.40 (November 08 2015)
* Increased the minimum supported Jenkins version to 1.609
* Added support for the [Sauce OnDemand Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Sauce+OnDemand+Plugin)
Expand Down
Expand Up @@ -57,10 +57,10 @@ class RunConditionContext extends AbstractContext {
/**
* Runs the build steps if the current build has a specific cause.
*/
void cause(String buildCause, boolean exclusiveCondition) {
void cause(String buildCause, boolean exclusiveCause) {
this.condition = new SimpleCondition(
name: 'Cause',
args: ['buildCause': buildCause, 'exclusiveCondition': exclusiveCondition.toString()])
args: ['buildCause': buildCause, 'exclusiveCause': exclusiveCause.toString()])
}

/**
Expand Down
Expand Up @@ -2098,7 +2098,7 @@ class StepContextSpec extends Specification {
]
testConditionArgs << [
['arg1': 'foo', 'arg2': 'bar', 'ignoreCase': false], [:], [:],
['token': 'foo'], ['buildCause': 'foo', 'exclusiveCondition': true],
['token': 'foo'], ['buildCause': 'foo', 'exclusiveCause': true],
['expression': 'some-expression', 'label': 'some-label'],
['earliestHours': 9, 'earliestMinutes': 10,
'latestHours': 14, 'latestMinutes': 45,
Expand Down Expand Up @@ -2477,8 +2477,8 @@ class StepContextSpec extends Specification {
'alwaysRun' | [] | 'org.jenkins_ci.plugins.run_condition.core.AlwaysRun' | [:]
'neverRun' | [] | 'org.jenkins_ci.plugins.run_condition.core.NeverRun' | [:]
'booleanCondition' | ['someToken'] | 'org.jenkins_ci.plugins.run_condition.core.BooleanCondition' | [token: 'someToken']
'cause' | ['userCause', true] | 'org.jenkins_ci.plugins.run_condition.core.CauseCondition' | [buildCause : 'userCause',
exclusiveCondition: 'true']
'cause' | ['userCause', true] | 'org.jenkins_ci.plugins.run_condition.core.CauseCondition' | [buildCause : 'userCause',
exclusiveCause: 'true']
'stringsMatch' | ['some1', 'some2', true] | 'org.jenkins_ci.plugins.run_condition.core.StringsMatchCondition' | [arg1 : 'some1',
arg2 : 'some2',
ignoreCase: 'true']
Expand Down

0 comments on commit 582c9c8

Please sign in to comment.