Last active
June 20, 2021 16:23
-
-
Save NSnietol/028d14f4812f424c1ecb585e32897b97 to your computer and use it in GitHub Desktop.
Jenkins_slave_docker_compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
jenkins_master: | |
image: jenkins/jenkins:lts | |
container_name: jenkins-lts | |
user: root | |
restart: always | |
volumes: | |
- $HOME/jenkins:/var/jenkins_home | |
ports: | |
- 127.0.0.1:2345:2345 | |
- 8080:8080 | |
- 50000:50000 | |
# JENKINS MASTER CONFIG | |
# TODO: document | |
# SLAVE PRE-REQS | |
# jenkins > manage jenkins > manage nodes > new node | |
# node name > permanent agent / copy existing node | |
# executors: the number it's to you | |
# remote root: /var/jenkins_home | |
# defaults for rest | |
# select node from nodes list to get java launch opts w/secret hash | |
jenkins_node: | |
image: cloudbees/jnlp-slave-with-java-build-tools | |
container_name: node | |
user: root | |
restart: always | |
environment: | |
- JENKINS_SECRET=871a13fd36c65e3fb13f85abd17b4a66b0be9a0273c1e5a115aa5f7ce819221c | |
- JENKINS_AGENT_NAME=node-xs | |
- JENKINS_URL=http://172.17.0.1:8080 | |
- JENKINS_AGENT_WORKDIR=/var/jenkins_home | |
depends_on: | |
- jenkins_master | |
volumes: | |
- $HOME/jnlp_node:/var/jenkins_home | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment