Help with Config File Provider Plugin in Pipeline

406 views
Skip to first unread message

Taylor Patton

unread,
Sep 21, 2016, 12:14:49 PM9/21/16
to jenkins...@googlegroups.com

Hi,


I’m trying to use the Config File Provider Plugin in my Pipeline build but its not working. Following the very basic example from the wiki page:


configFileProvider(

        [configFile(fileId: ‘my-custom-file-id', variable: 'MAVEN_SETTINGS')]) {

        sh 'mvn -s $MAVEN_SETTINGS clean package'

    }


Results in this error:


groovy.lang.MissingPropertyException: No such property: MAVEN_SETTINGS for class: groovy.lang.Binding

at groovy.lang.Binding.getVariable(Binding.java:63)



I can see that the file is indeed copied into my workspace, but I’m not able to use the file with “mvn -s $MAVEN_SETTINGS”:


I am able to view the contents of the file like this, however:

sh 'cat $MAVEN_SETTINGS’


Please advise,


-Taylor

Andrei Pacurar

unread,
Sep 22, 2016, 4:40:38 AM9/22/16
to Jenkins Users
use  sh 'mvn -s \$MAVEN_SETTINGS clean package'

(escape before the $ sign)
Reply all
Reply to author
Forward
0 new messages