I am at this exact same point trying to figure it out, but it looks like 
this simply cannot be done at the moment :(

El viernes, 10 de junio de 2016, 9:56:42 (UTC-3), Michael Irwin escribió:
>
> Versions (current for each)...
> - Jenkins - 2.8
> - Credentials Plugin - 2.0.7
> - Credentials Binding Plugin - 1.7
> - Pipeline: Multibranch - 2.6
> (let me know if you need any others)
>
> - Working in a multibranch project
> - Created a "Secret File" credential in the Global scope (just for 
> testing) with id "settings-file".  
> - Jenkinsfile has:
>
> node {
>   ...
>   withCredentials([$class: 'FileBinding', credentialsId: 'settings-file', 
> variable: 'SETTINGS_LOCATION']) {
>     sh "cp $SETTINGS_LOCATION ./settings.xml"
>   }
>   ...
> }
>
> When it runs, get hit with...
>
> groovy.lang.MissingPropertyException: No such property: SETTINGS_LOCATION for 
> class: groovy.lang.Binding
>
>
> Oddly, when I open the "Pipeline Syntax" at the project, I'm able to produce 
> a Groovy snippet for the credential.  But, if I open the "Pipeline Syntax" at 
> the branch level (within the project folder), there are no credentials 
> available for me to select in the snippet generator.  So, it seems that the 
> folder isn't getting the same visibility to the credential (even though it 
> was defined globally).
>
> Any pointers?
>
> --
> Michael Irwin
>
>

-- 
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/34aaef83-a04f-495f-b7ef-dc9fed3c32c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to