blob: 9a006c92d4d07f2a69a1bcf01344c7df208da3b6 [file] [log] [blame]
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +02001=======
2Jenkins
3=======
4
5Install and configure Jenkins master and slave.
6
7Available states
8================
9
10.. contents::
11 :local:
12
13``jenkins.master``
14------------------
15
16Setup jenkins master
17
18``jenkins.slave``
19-----------------
20
21Setup jenkins slave
22
23``jenkins.job_builder``
24-----------------------
25
26Setup jenkins job builder
27
28Available metadata
29==================
30
31.. contents::
32 :local:
33
34``metadata.jenkins.master.single``
35----------------------------------
36
37Setup single-node master
38
39
40``metadata.jenkins.slave.single``
41---------------------------------
42
43Setup Jenkins slave
44
45Configuration parameters
46========================
47
48
49Example reclass
50===============
51
52Master
53------
54
55.. code-block:: yaml
56
57 classes:
58 - service.jenkins.master
59
60 parameters:
61 _param:
62 jenkins_admin_token: xyz
63 jenkins_admin_password_hash: xyz
64 jenkins_admin_password: xyz
65 job_builder_config_address: git@github.com:xyz/myjobs.git
66 job_builder_config_branch: master
67 nginx:
68 server:
69 site:
70 jenkins:
71 enabled: true
72 type: nginx_proxy
73 name: jenkins
74 proxy:
75 host: 127.0.0.1
76 port: 8080
77 protocol: http
78 host:
79 name: jenkins.example.com
80 port: 80
81 jenkins:
82 master:
83 mode: EXCLUSIVE
84 slaves:
85 - name: slave01
86 label: pbuilder
87 executors: 2
88 - name: slave02
89 label: image_builder
90 mode: EXCLUSIVE
91 executors: 2
92 views:
93 - name: "Package builds"
94 regex: "debian-build-.*"
95 - name: "Contrail builds"
96 regex: "contrail-build-.*"
97 - name: "Aptly"
98 regex: "aptly-.*"
99 plugins:
100 - name: slack
101 - name: extended-choice-parameter
102 - name: rebuild
103 - name: test-stability
104
105Slave
106-----
107
108.. code-block:: yaml
109
110 classes:
111 - service.jenkins.slave.single
112 - service.java.environment
113
114 parameters:
115 _param:
116 java_environment_platform: openjdk
117 java_environment_version: 7
118
119 jenkins:
120 slave:
121 master:
122 host: jenkins.example.com
123 port: 80
124 user:
125 name: jenkins_slave
126 password: dexiech6AepohthaiHook2iesh7ol5ook4Ov3leid3yek6daid2ooNg3Ee2oKeYo
127 gpg:
128 keypair_id: A76882D3
129 public_key: |
130 -----BEGIN PGP PUBLIC KEY BLOCK-----
131 ...
132 private_key: |
133 -----BEGIN PGP PRIVATE KEY BLOCK-----
134 ...
135
136Read more
137=========
138
139* https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins