How to pass the password to the jenkins build -
i have java class requires password of user stored in local machine of user, when trigger build in master jenkins, build failed due authentication searching user password not available in machine.how can make generics jenkins build successful.
set environment variables instead of hard code.
example:
for each machine, set variable first
- your local - set path_to_my_password="u:/authentication/pw.txt"
- jenkins - set path_to_my_password="c:/my_jenkins/pw.txt"
then change code to:
private static final string password_file_path = system.getenv("path_to_my_password"); 
Comments
Post a Comment