blob: 3b817b6fd7e3e3a612b8f9f10d10c99c57c021c2 [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
69 slaves:
70 - name: slave01
71 label: pbuilder
72 executors: 2
73 - name: slave02
74 label: image_builder
75 mode: EXCLUSIVE
76 executors: 2
77 views:
78 - name: "Package builds"
79 regex: "debian-build-.*"
80 - name: "Contrail builds"
81 regex: "contrail-build-.*"
82 - name: "Aptly"
83 regex: "aptly-.*"
84 plugins:
85 - name: slack
86 - name: extended-choice-parameter
87 - name: rebuild
88 - name: test-stability
89
Ales Komarek4c0bab12016-01-22 12:10:50 +010090Jenkins slave
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +020091
92.. code-block:: yaml
93
Ales Komarek4c0bab12016-01-22 12:10:50 +010094 jenkins:
95 slave:
96 master:
97 host: jenkins.example.com
98 port: 80
99 user:
100 name: jenkins_slave
101 password: dexiech6AepohthaiHook2iesh7ol5ook4Ov3leid3yek6daid2ooNg3Ee2oKeYo
102 gpg:
103 keypair_id: A76882D3
104 public_key: |
105 -----BEGIN PGP PUBLIC KEY BLOCK-----
106 ...
107 private_key: |
108 -----BEGIN PGP PRIVATE KEY BLOCK-----
109 ...
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200110
Ales Komarek4c0bab12016-01-22 12:10:50 +0100111Usage
112=====
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200113
Ales Komarek4c0bab12016-01-22 12:10:50 +0100114Generate password hash:
115
116.. code-block:: bash
117
118 echo -n "salt{plainpassword}" | openssl dgst -sha256
119
120Place in the configuration ``salt:hashpassword``.
Filip Pytloun8bfd2bf2015-10-06 16:28:32 +0200121
122Read more
123=========
124
125* https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins