jenkins-slave.service.erb 584 Bytes
Newer Older
1
2
3
4
5
6
[Unit]
Description=Jenkins slave node

[Service]
Type=simple
ExecStartPre=/usr/local/share/jenkins-slave-download <%= @master_url %>
7
8
9
10
11
ExecStartPre=/usr/local/share/jenkins-enable-node \
    --orchestrator-url <%= @master_url %> \
    --api-user <%= @api_user %> \
    --api-token-file /etc/jenkins/jenkins_apikey \
    --node-name <%= @domain == "lizard" ? @hostname : @fqdn %>
12
ExecStart=/usr/bin/java -jar /run/jenkins/slave.jar -jnlpUrl <%= @master_url %>/computer/<%= @node_name %>/slave-agent.jnlp
13
14
15
16
17
18
User=jenkins
LimitNOFILE=8192
Restart=always

[Install]
WantedBy=multi-user.target