Is there a way to get the last commit message without access to the repo? svn log --limit 1
tries to connect to the repo.
EDIT: I have credentials setu
This is what Jenkins Credentials plugin is for.
You configure credentials securely on Jenkins Global Configuration, and let the job reference that. No need to write anything in the script.
Edit:
To securely use a password from within a shell step
In any build step, you can now use $name
(as defined earlier) to refer to a password as you would if you were typing it in plain text.
$name
on command line of the server by itself will not produce anything, and like all Jenkins variables, it is not persistent).****
instead of password, if it appears.The only security concern is that if someone has administrative permissions to configure your job, they can write echo $name > secretpassword.txt
into a build step, and then review the file in the workspace. But you should be careful who you assign administrative rights to.