blob: a1a0d8f1bf9131314aec68c53190264f58f77c47 [file] [log] [blame]
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +02001=======
2Jenkins
3=======
4
Ales Komarek4c0bab12016-01-22 12:10:50 +01005Jenkins is an application that monitors executions of repeated jobs, such as building a software project or jobs run by cron.
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +02006
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
Ales Komarek4c0bab12016-01-22 12:10:50 +010045Example pillars
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020046===============
47
Ales Komarek4c0bab12016-01-22 12:10:50 +010048Jenkins master
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020049
50.. code-block:: yaml
51
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020052 nginx:
53 server:
54 site:
55 jenkins:
56 enabled: true
57 type: nginx_proxy
58 name: jenkins
59 proxy:
60 host: 127.0.0.1
61 port: 8080
62 protocol: http
63 host:
64 name: jenkins.example.com
65 port: 80
66 jenkins:
67 master:
68 mode: EXCLUSIVE
Filip Pytloun52b9c2c2016-01-28 13:45:57 +010069 # Do not manage config.xml from Salt, use UI instead
70 no_config: true
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020071 slaves:
72 - name: slave01
73 label: pbuilder
74 executors: 2
75 - name: slave02
76 label: image_builder
77 mode: EXCLUSIVE
78 executors: 2
79 views:
80 - name: "Package builds"
81 regex: "debian-build-.*"
82 - name: "Contrail builds"
83 regex: "contrail-build-.*"
84 - name: "Aptly"
85 regex: "aptly-.*"
86 plugins:
87 - name: slack
88 - name: extended-choice-parameter
89 - name: rebuild
90 - name: test-stability
91
Ales Komarek4c0bab12016-01-22 12:10:50 +010092Jenkins slave
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020093
94.. code-block:: yaml
95
Ales Komarek4c0bab12016-01-22 12:10:50 +010096 jenkins:
97 slave:
98 master:
99 host: jenkins.example.com
100 port: 80
101 user:
102 name: jenkins_slave
103 password: dexiech6AepohthaiHook2iesh7ol5ook4Ov3leid3yek6daid2ooNg3Ee2oKeYo
104 gpg:
105 keypair_id: A76882D3
106 public_key: |
107 -----BEGIN PGP PUBLIC KEY BLOCK-----
108 ...
109 private_key: |
110 -----BEGIN PGP PRIVATE KEY BLOCK-----
111 ...
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200112
Ales Komarek4c0bab12016-01-22 12:10:50 +0100113Usage
114=====
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200115
Ales Komarek4c0bab12016-01-22 12:10:50 +0100116Generate password hash:
117
118.. code-block:: bash
119
120 echo -n "salt{plainpassword}" | openssl dgst -sha256
121
122Place in the configuration ``salt:hashpassword``.
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200123
124Read more
125=========
126
127* https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins