I was dealing with similar issue today and only place that I could use to 
store config was credentials secret text. I stored config as a map and in 
pipeline, within withCredentials block, I used Eval statement to convert it 
to proper map, so I could use current branch name as a key to get value. 
Works quite ok for me as I can have different configs on different servers 
now.

M.

On Friday, January 6, 2017 at 5:53:14 PM UTC+1, Sebastian Nowicki wrote:
>
> Unfortunately, no. I suppose one solution would be to remove environment 
> specific stuff from the build phase and specify environment specific 
> settings when running the application. May not be a viable solution for you 
> though.
>
> On Wednesday, 4 January 2017 12:03:43 UTC+1, Hans Kristian Flaatten wrote:
>>
>> I have the exact same problem! Did you ever find a solution or 
>> workaround, Sebastian?
>>
>> On Monday, June 13, 2016 at 4:37:50 PM UTC+2, Sebastian Nowicki wrote:
>>>
>>> Hi,
>>>
>>> I have create a parameterised Multibranch Pipeline job, defining the 
>>> parameters and their defaults in a Jenkinsfile inside the repository being 
>>> built.
>>>
>>> The job will be built on multiple environments, with separate Jenkins 
>>> deployments. The defaults set in the Jenkinsfile are production values, but 
>>> I'd like to be able to set different values globally in the other 
>>> deployments. Is there any way to override the default value globally for 
>>> the whole job?
>>>
>>> I've found the Environment Injector 
>>> <https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin> plugin, 
>>> but it doesn't seem like it's possible to customize a job which uses a 
>>> Jenkinsfile.
>>>
>>

-- 
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/53bbde4c-4631-44fa-8e37-41b0b2611d72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to