How do I pass JNLP command arguments from a file?

Issue

We want to be able to launch a JNLP agent using command line options, nevertheless when the agent is running others could get connection information that we would prefer to hide from a ps command execution.

Environment

Resolution

As described in one of the comments inside JENKINS-18342, we can create a file where each entry shown below must be in a different line:

params.txt

-jnlpUrl
http://somewhere/xx.jnlp
-secret
<SECRET>

Once that we save this file as params.txt we should be able to invoke the agent using the syntax shown below:

java -jar agent.jar @params.txt

Tested product/plugin versions

References

Have more questions?

0 Comments

Please sign in to leave a comment.