I am describing behavior that does not appear consistent....
When calling a job from the rundeck plugin in jenkins, I have an
explicitly passed parameter where two other parameters are
implicitly set via defaults in rundeck job. This works as expected.
When trying to call the same job via a higher level rundeck job
using jobref, the default parameter values do not get expanded.
Inline are configuration for rundeck plugin in jenkins and
jobxml that refers to another job that describes the problem.
Jenkins Plugin Config:
Here is my jenkins configuration with rundeck plugin that refers
to a jobId where we see the explicit parameter:
<org.jenkinsci.plugins.rundeck.RundeckNotifier>
<jobId>93</jobId>
<options>package=zap-rundeck-jobs</options>
<tag></tag>
<shouldWaitForRundeckJob>true</shouldWaitForRundeckJob>
<shouldFailTheBuild>true</shouldFailTheBuild>
</org.jenkinsci.plugins.rundeck.RundeckNotifier>
when build occurs it triggers job id 93
with desired results when tailing log in rundeck:
12:41:33 ciHost: dev-ctier1.acme.com:8180
12:41:33 package: zap-rundeck-jobs
12:41:33 archiveFile: archive.zip
All three parameters are expanded.
A reference to a same job using jobref (NOTE: this is using the
non numeric reference of the same job above):
117 INFO promote zap package from the CI environment and deploy to
the dev environment promoteAndDeploy Acme 1 false true yum
zap/dev
we see that the defaults are not expanded:
12:45:25 ciHost: option.ciHost
12:45:25 package: zap-rundeck-jobs
12:45:25 archiveFile: option.archiveFile
And just the explicitly passed parameter is interpreted
properly.
And the job that is being called (jobId: 93 == zap/dev promote),
which shows that parameters and desired default that should be
populating.
93 INFO
echo "package: @option.package@"
echo "archiveFile: @option.archiveFile@"
exit
]]> promote zap packages from the CI environmentpromote Acme
1 false true yum zap/dev