Hello All,
Need help with pipeline build error in this setup:
Jenkins v2.36 with standard pipeline plugins + configFileProvider plugin
Here is the content of Jenkinsfile, pipeline script:
node('master') {
stage(' == Capitals == ') {
configFileProvider([configFile(field: 'capital_jsoncfg', variable: 'capitals_info')]) {
echo " == content of json cfg == "
sh "cat $capitals_info"
}
}
}
And, the pipeline build fails with this error (followed by verbose output):
java.lang.IllegalArgumentException: Failed to prepare configFileProvider step
at org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:315)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:129)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
Read thru' the example given here:
https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+PluginSearched this forum and stack overflow for possible clues but no successful hits until now.
Does anyone know what's wrong with the pipeline script ?
P.S :
In the same setup of Jenkins master, I have a freestyle job configured to use the same json cfg, in that job there are no such issues.
Simple shell command, like, cat-ing the contents of JSON cfg works in the freestyle job.
TIA,
/Ram