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.
I believe any action on a SVN repository uses the SVN repository's credential settings. However, if you have access on the server where the SVN repository is being hosted, you could create a own script to read out {repository-root}/db/revprops
folder. Here you can find all the revision commit messages.