Jenkins client with support for docker swarm.
on Jenkins master:
- install Self-Organizing Swarm Module (ID:swarm)
- set "Configure Global Security"->"TCP port for JNLP agents" (default:50000)
on the server running Jenkins:
- add port for "JNLP agents" to your system firewall
- initialize docker swarm
docker service create \
--name jenkins-swarm-client \
-e LABELS=swarm-client \
-e MASTER=http://127.0.0.1:80 \
-e USER_NAME=jenkins \
-e USER_PASSWORD=jenkins_pw \
--mount "type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock" \
nicatorba/jenkins-docker-swarm-client| Environment variable | Default value | Description |
|---|---|---|
| LABELS | required | Whitespace-separated list of lables to be assigned for this client |
| JENKINS_URL | required | The complete target Jenkins URL |
| USER_NAME | required | The Jenkins username for authentication |
| USER_PASSWORD | required | The Jenkins user password |
| CLIENT_NAME | optional | Name of the client |
| JENKINS_HOME | /var/jenkins | Directory where Jenkins place files |
| EXECUTORS | 1 | Number of executors |