Skip to content

Instantly share code, notes, and snippets.

@dustinmm80
Created March 8, 2016 22:45
Show Gist options
  • Save dustinmm80/a002e2a6bffb1507e7f3 to your computer and use it in GitHub Desktop.
Save dustinmm80/a002e2a6bffb1507e7f3 to your computer and use it in GitHub Desktop.
Connecting Jenkins executor to master with Jenkins Swarm plugin
echo "Connecting with Jenkins Swarm plugin"
sudo -H -u jenkins bash -c '
curl -kL -o $HOME/swarm-client.jar \
http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/2.0/swarm-client-2.0-jar-with-dependencies.jar
'
sudo -H -u jenkins bash -c "
java -jar \$HOME/swarm-client.jar \
-fsroot /var/lib/jenkins \
-executors 6 \
-labels docker -labels {{ref('NodeName')}} \
-master https://jenkins.conjur.net \
-name {{ref('NodeName')}} -mode exclusive \
-username slaves -password $(conjur variable value jenkins/swarm/password) &
"
@thanhmimi
Copy link

Hi Dustin,
thanks for this script, i have a question below:
-username slaves -password $(conjur variable value jenkins/swarm/password)
what is conjur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment