-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatible swarm-client is automatically downloaded form jenkins #11
base: master
Are you sure you want to change the base?
Conversation
Vad1mo
commented
Mar 7, 2018
- Download latest swarm client from current jenkins on start. see Add ability to download the client directory from the plugin installed in Jenkins jenkinsci/swarm-plugin#62
- Support Env vars and secret files
- Document Variables
- Sensible Defaults for variables
- Support Env vars and secret files - Document Variables - Sensible Defaults for variables
I did change a few of the variables not sure if that will break some of the others setups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great (with a comment about compatibility).
# exec su jenkins -c "exec java -jar /home/jenkins/swarm-client.jar ${COMMAND_OPTIONS}" | ||
java -jar /swarm-client.jar -master ${JENKINS_URL:="http://jenkins:8080"} -username ${USR:="jenkins-swarm-agent"} ${PASWD_OPT} ${SWARM_CLIENT_OPTS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add an if
statement so that COMMAND_OPTIONS
is used if it has a value, otherwise, the new command? That way we'd maintain backward compatibility. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean something like this:
if env.${COMMAND_OPTIONS}.isNotEmpty() then
java -jar /swarm-client.jar ${COMMAND_OPTIONS}
else
java -jar /swarm-client.jar -master ${JENKINS_URL:="http://jenkins:8080"} -username ${USR:="jenkins-swarm-agent"} ${PASWD_OPT} ${SWARM_CLIENT_OPTS}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like that should do. Bear in mind that PASWD_OPT
needs to be added to both cases.
I just realized that I wrote a review a while ago but forgot to submit it :( |