I need to be able to build the release version of my apk, using a Jenkins job.
From reading the following SO question
How to create a release signed apk file u
You can use Mask Password Plugin, which does just that. Or the same functionality is included in EnvInject plugin, and sooner or later all Jenkins projects get a need for EnvInject plugin (that does many other things), so might as well start using it now.
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.