I am having a jenkins pipeline job which has username and password as string and password parameters. i want to get the values from the parameter and mask the values so that i can use it pipeline for accessing my tool. can someone help on this please
Asked
Active
Viewed 1,397 times
1
-
Jenkins should take care it. If you choose parameter type to `Password`, Jenkins will mask it as `***` in console output. Can you show your pipeline code. – yong Mar 21 '19 at 05:07
-
when i am using the varaible in jenkins pipeline teh password is printed in cleartext – Antony Ronald Mar 21 '19 at 05:27
-
I'm wrong, Jenkins not mask Password parameter, but Credentials Binding in console output. – yong Mar 21 '19 at 07:49
1 Answers
1
You can either use:
- the JENKINS EnvInject Plugin, which beings Inject passwords to the build as environment variables
- or the JENKINS Mask Passwords Plugin
With pipelines, you would use an array of secrets.

VonC
- 1,262,500
- 529
- 4,410
- 5,250