Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vad1mo
Copy link

@Vad1mo Vad1mo commented Mar 7, 2018

- Support Env vars and secret files
- Document Variables
- Sensible Defaults for variables
@Vad1mo
Copy link
Author

Vad1mo commented Mar 7, 2018

I did change a few of the variables not sure if that will break some of the others setups.

Copy link
Owner

@vfarcic vfarcic left a 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}
Copy link
Owner

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?

Copy link
Author

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}

Copy link
Owner

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.

@vfarcic
Copy link
Owner

vfarcic commented Apr 15, 2018

I just realized that I wrote a review a while ago but forgot to submit it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants