18 lines
529 B
Bash
18 lines
529 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${JENKINS_URL:?JENKINS_URL is required}"
|
|
: "${JENKINS_USER:?JENKINS_USER is required}"
|
|
: "${JENKINS_PASSWORD:?JENKINS_PASSWORD is required}"
|
|
: "${JENKINS_AGENT_NAME:?JENKINS_AGENT_NAME is required}"
|
|
|
|
exec java -jar /usr/local/bin/swarm-client.jar \
|
|
-master "${JENKINS_URL}" \
|
|
-username "${JENKINS_USER}" \
|
|
-password "${JENKINS_PASSWORD}" \
|
|
-name "${JENKINS_AGENT_NAME}" \
|
|
-labels "${JENKINS_LABELS:-jjb docker}" \
|
|
-executors 1 \
|
|
-mode exclusive \
|
|
-disableSslVerification
|