Thanks for the answer!
Where do you inject the username and password? I think you do it into the
current build.
But I want to inject a new variable or change an existing variable (like
e.g. username or password) into the global configuration, thus next time
when I go into the Global Jenkins Configuration UI, I could see the
username or password in the section "Global properties".
Is this possible? Is there a package like "hudson.configuration.global"
within the API which would allow me to change the environment variable
within the global properties jenkins configuration section?
Am Montag, 22. September 2014 19:48:12 UTC+2 schrieb Walter Kacynski:
>
> I use the following script to inject a username and password:
>
> usernamePassword = build.getEnvironment(null)[secret]
> def (username, password) = usernamePassword.split(':')
>
> e = new hudson.EnvVars()
> e.put(secret + '_USERNAME', username)
> e.put(secret + '_PASSWORD', password)
> build.environments.add(hudson.model.Environment.create(e))
>
>
> On Monday, September 22, 2014 3:23:51 AM UTC-4, mr wrote:
>>
>> Hi Folks!
>>
>> Do anybody have an idea how to set/change the variables within a Groovy
>> script?
>>
>> Regards!
>>
>
--
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].
For more options, visit https://groups.google.com/d/optout.