blob: 73e8140ef3b2f80d6a10035efb1cf3b59a57bb65 [file] [log] [blame]
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +01001classes:
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +01002- system.docker.swarm.stack.jenkins.slave_base
3parameters:
4 _param:
5 jenkins_slave01_node_name: ${_param:cluster_node01_name}
6 docker:
7 client:
8 stack:
9 jenkins:
10 service:
11 slave01:
12 environment:
13 JENKINS_URL: ${_param:jenkins_master_url}
14 JENKINS_AGENT_NAME: slave01
15 JENKINS_UPDATE_SLAVE: 'true'
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040016 JENKINS_LOGIN: ${_param:jenkins_client_user}
17 JENKINS_PASSWORD: ${_param:jenkins_client_password}
18 JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010019 https_proxy: ${_param:docker_https_proxy}
20 http_proxy: ${_param:docker_http_proxy}
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040021 no_proxy: "jenkins_master,${_param:docker_no_proxy}"
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010022 deploy:
23 restart_policy:
24 condition: any
25 placement:
26 constraints:
27 - "node.hostname == ${_param:jenkins_slave01_node_name}"
28 image: ${_param:docker_image_jenkins_slave}
29 volumes:
rootb8ea1c82019-05-30 08:59:27 +000030 - /etc/ssl/certs/:/etc/ssl/certs/:ro
Denis Egorenko4d184292019-05-16 17:14:27 +040031 - /dev/urandom:/dev/random:ro
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010032 - /var/run/docker.sock:/var/run/docker.sock
33 - /usr/bin/docker:/usr/bin/docker:ro
34 - /var/lib/jenkins:/var/lib/jenkins