So I'm trying to use withCredentials() with unique variables and looking 
for the best way. 

I have the following password that is unique per region which we call 
clients

client1 = foo
client2 = bar
client3 = baz

So i have a script that might look like

sh "./deploy -password <unique PW here from above>"

For one region its fine

withCredentials([
        string(credentialsId: 'pw', variable: 'PW'),
]) {
       sh "./deploy -password ${PW}"
}

We have a env that gets passed in like ${env.REGION}

Anyone have a good way with jenkins credentials to lookup a unique PW per 
region that would easily work for a scripted pipeline. 

-- 
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/ab495866-c8fe-4d5a-9a52-caa72e1262eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to