Status: Closed (View Workflow)
Environment:Jenkins version 1.612
DSL plugin 1.40
Running in Redhat 6.6 x86_64
Using Google Chrome Version 46.0.2490.86 (64-bit)
java version "1.7.0_85"
OpenJDK Runtime Environment (rhel-184.108.40.206.el6_7-x86_64 u85-b01)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
The configuration created by the DSL plugin for the USER_CAUSE run condition 'exclusiveCause' parameter is not correct.
You can see in the DSL_Code.png image I have attached that my DSL code is correct, and that this script is supposed to create a job that runs a shell script based on some conditions. One of those conditions is an OR condition with 3 conditions. One of those conditions is a "cause" condition. Currently, running this script as is produces a job that does not have any build steps.
Looking more closely, I noticed that in the config.xml file that gets created, the xml element for the "exclusiveCause" option of the run condition is actually being incorrectly named "exclusiveCondition" instead of "exclusiveCause". This is causing the job to not be created correctly.
Below I have posted a diff of the config file of a job that was manually created (config2.xml) to do the same thing, and the DSL config file (config.xml), grepping for 'cause'. You can clearly see that "<exclusiveCause>" is not listed for the DSL config file. Instead it appears as "<exclusiveCondition>", which is not correct.
[Tue Nov 17 12:33:43] user ➤ domain ➔ ~
$ diff config.xml config2.xml | grep -i cause
> <condition class="org.jenkins_ci.plugins.run_condition.core.CauseCondition">
< <condition class='org.jenkins_ci.plugins.run_condition.core.CauseCondition'>