Forgot to write: We mitigate the hack by wrapping it up as a global library 
custom step.

On Tuesday, December 5, 2017 at 1:57:46 PM UTC-8, Brian Ray wrote:
>
> We use the Config File Provider plugin 
> <https://plugins.jenkins.io/config-file-provider> and the Pipeline 
> Utilities Steps plugin <https://plugins.jenkins.io/pipeline-utility-steps> 
> in conjunction with folders to get around the JENKINS-42906 gap, in a 
> Scripted Pipeline context.
>
> This is actually nicer IMHO than the hidden env variables functionality, 
> because you can use various flavors of configuration files, use an editor 
> that understands your flavor(s) of choice, and then paste back into the UI.
>
> In our case we're just using simple Java properties files something like 
> the following.
>
>   def props
>   node() {
>     configFileProvider( [ configFile( fileId: 'your-folder-cfg-file-id', 
> variable: 'WHATEVER', replaceTokens: true ) ] ) {
>       props = readProperties( file: WHATEVER )
>     }
>   }
>   //now go do stuff with the props Map, even massaging for consumption by 
> withEnv() ...
>
> The ony downside is, I suppose, is the hacky nature of having the 
> properties written down to the agent's workspace just to read them right 
> back again and discard the file.
>
> Brian
>
> On Wednesday, October 25, 2017 at 11:39:09 AM UTC-7, Sébastien Hinderer 
> wrote:
>>
>> Thanks a lot for your response, Stephen. 
>> Not sure I'm brave enough to try to write something myself. 
>> Just too bad it does not already exist but I guess we'll just do without 
>> since it'd be a nice addition but not really mandatory. 
>>
>> Best wishes, 
>>
>> Sébastien. 
>>
>

-- 
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/688fd93b-db7c-4f54-a4f0-90d9a24b781d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to