-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins v2.36, configFileProvider plugin v2.15
Within a freestyle job (setup using the above environment), am able to read the contents of the config file (it's JSON formatted).
However, using the pipeline scripts, build fails with this error.
Snippet of the error from build log:
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)
And, this is the Jenkinsfile:
stage(' == Capitals == ') {
configFileProvider([configFile(field: 'capital_jsoncfg', variable: 'capitals_info')])
}
I did use snippet generator made available within the context of "Pipeline Syntax" to verify this piece of code. So, I presume (from reading the plugin documentation) script syntax should be okay.