Re: Help with Config File Provider Plugin in Pipeline

2016-09-22 Thread Andrei Pacurar
use  sh 'mvn -s \$MAVEN_SETTINGS clean package'

(escape before the $ sign)

On Wednesday, September 21, 2016 at 7:14:49 PM UTC+3, Taylor Patton wrote:
>
> 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
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/675ce9d8-c537-455c-8214-a8b95908c9b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help with Config File Provider Plugin in Pipeline

2016-09-21 Thread Taylor Patton
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

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMvOKWTt98fRi19-ieg5wTU0AD5F3BaPqqaa1BobmdqKro6VjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.