In addition to mention:
The "Snippet Generator" provides documentation on this:
*Password Parameter*s, or any other type of build parameters selected for
masking in Hudson's/Jenkins' main configuration screen (*Manage Hudson* >
*Configure
System*), will be automatically masked.
And also provide code generation. Even with specifying in the job
a name and a password doesn't work:
wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs:
[[password: '4567', var: 'BAR']]]) {
echo "BAR=${BAR}"
echo "FOO=${FOO}"
}
Result:
groovy.lang.MissingPropertyException: No such property: BAR for class:
WorkflowScript
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
On Wednesday, April 27, 2016 at 11:31:15 AM UTC+2, [email protected]
wrote:
>
> I created a masked password FOO with "1234".
> Here my simple test DSL script:
>
> node {
> stage "ONE"
>
> wrap([$class: 'MaskPasswordsBuildWrapper']) {
> echo "FOO=${FOO}"
> }
> }
>
> Independent whether I check "Prepare an environment for the run" or not
> ...
> I get this:
>
> groovy.lang.MissingPropertyException: No such property: FOO for class:
> WorkflowScript
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
>
>
> Most probably I'm using it the wrong way.
> Could you please help on this?
>
> Regards,
> Thomas
>
>
>
>
>
--
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/beed4e52-0c25-4304-9148-80f4b3c5e17c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.