On Monday, January 9, 2017 at 9:38:24 AM UTC+5:30, Ramanathan Muthaiah 
wrote:
>
> 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)
>
>
This issue is solved. Usage of incorrect syntax (marked in italics) was 
causing Pipeline build errors.

node('master') {
  stage(' == Capitals == ') {     
     configFileProvider([configFile(*fileId*: 
'<substitute-alpha-numeric-value>', variable: 'capitals_info')]) {
         echo " == content of json cfg == "
         sh "cat $capitals_info"
     }
  }
}

Dominik suggested he will make improvements to display a better error 
message.
https://issues.jenkins-ci.org/browse/JENKINS-40973

Thanks Dominik for your help. 

/Ram

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6f117e77-0143-44a4-9aa3-f4850aac7cc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to