OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 1 | ===== |
| 2 | Usage |
| 3 | ===== |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 4 | |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 5 | Jenkins CI is an open source automation server written in Java. Jenkins |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 6 | helps to automate the non-human part of software development process, |
| 7 | with continuous integration and facilitating technical aspects of |
| 8 | continuous delivery. |
Dan Alvizu | 5d9336b | 2018-01-15 14:43:51 -0700 | [diff] [blame] | 9 | |
| 10 | More information can be found at `<https://jenkins.io/>`_ |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 11 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 12 | Setup jenkins client, works with Salt 2016.3+, supports pipeline |
| 13 | workflow projects only for now. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 14 | |
Dan Alvizu | 5d9336b | 2018-01-15 14:43:51 -0700 | [diff] [blame] | 15 | Dependencies |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 16 | ============ |
Dan Alvizu | 5d9336b | 2018-01-15 14:43:51 -0700 | [diff] [blame] | 17 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 18 | To install on Ubuntu, you will need to add the jenkins debian repository |
| 19 | to the target server. You can do this with the |
Pavel Cizinsky | e8cb7a0 | 2018-12-12 12:02:10 +0100 | [diff] [blame] | 20 | `salt-formula-linux formula <https://gerrit.mcp.mirantis.com/salt-formulas/linux>`_ , |
Dan Alvizu | 5d9336b | 2018-01-15 14:43:51 -0700 | [diff] [blame] | 21 | with the following pillar data: |
| 22 | |
| 23 | .. code-block:: yaml |
| 24 | |
| 25 | linux: |
| 26 | system: |
| 27 | enabled: true |
| 28 | repo: |
| 29 | jenkins: |
| 30 | enabled: true |
| 31 | source: "deb http://pkg.jenkins.io/debian-stable binary/" |
| 32 | key_url: "https://pkg.jenkins.io/debian/jenkins-ci.org.key" |
| 33 | |
| 34 | This state will need to be applied *before* the jenkins state. |
| 35 | |
| 36 | Using this formula |
| 37 | ================== |
| 38 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 39 | To use this formula, you must install the formula to your Salt |
| 40 | Master as documented in |
| 41 | `saltstack formula docs <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#installation>`_ |
Dan Alvizu | 5d9336b | 2018-01-15 14:43:51 -0700 | [diff] [blame] | 42 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 43 | This formula is driven by pillar data, and can be used to |
| 44 | install either a Jenkins Master or Client. See pillar data |
| 45 | below for examples. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 46 | |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 47 | Sample pillars |
| 48 | ============== |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 49 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 50 | Master role |
| 51 | ----------- |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 52 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 53 | Simple master with reverse proxy: |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 54 | |
| 55 | .. code-block:: yaml |
| 56 | |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 57 | nginx: |
| 58 | server: |
| 59 | site: |
| 60 | jenkins: |
| 61 | enabled: true |
| 62 | type: nginx_proxy |
| 63 | name: jenkins |
| 64 | proxy: |
| 65 | host: 127.0.0.1 |
| 66 | port: 8080 |
| 67 | protocol: http |
| 68 | host: |
| 69 | name: jenkins.example.com |
| 70 | port: 80 |
| 71 | jenkins: |
| 72 | master: |
| 73 | mode: EXCLUSIVE |
Alexander Evseev | 2c494d7 | 2018-08-01 11:52:18 +0200 | [diff] [blame] | 74 | java_args: -Xms256m -Xmx1g |
Alexander Evseev | 1ed23bf | 2018-08-02 12:12:19 +0200 | [diff] [blame] | 75 | # Do not manage any xml config files via Salt, use UI instead |
| 76 | # Including config.xml and any plugin xml's. |
Filip Pytloun | 52b9c2c | 2016-01-28 13:45:57 +0100 | [diff] [blame] | 77 | no_config: true |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 78 | slaves: |
| 79 | - name: slave01 |
| 80 | label: pbuilder |
| 81 | executors: 2 |
| 82 | - name: slave02 |
| 83 | label: image_builder |
| 84 | mode: EXCLUSIVE |
| 85 | executors: 2 |
| 86 | views: |
| 87 | - name: "Package builds" |
| 88 | regex: "debian-build-.*" |
| 89 | - name: "Contrail builds" |
| 90 | regex: "contrail-build-.*" |
| 91 | - name: "Aptly" |
| 92 | regex: "aptly-.*" |
| 93 | plugins: |
| 94 | - name: slack |
| 95 | - name: extended-choice-parameter |
| 96 | - name: rebuild |
| 97 | - name: test-stability |
| 98 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 99 | Jenkins master with experimental plugin source support: |
Ales Komarek | af967ee | 2016-08-31 19:38:50 +0200 | [diff] [blame] | 100 | |
| 101 | .. code-block:: yaml |
| 102 | |
| 103 | jenkins: |
| 104 | master: |
| 105 | enabled: true |
| 106 | update_site_url: 'http://updates.jenkins-ci.org/experimental/update-center.json' |
| 107 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 108 | SMTP server settings: |
Ales Komarek | af967ee | 2016-08-31 19:38:50 +0200 | [diff] [blame] | 109 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 110 | .. code-block:: yaml |
| 111 | |
| 112 | jenkins: |
| 113 | master: |
| 114 | email: |
| 115 | engine: "smtp" |
| 116 | host: "smtp.domain.com" |
| 117 | user: "user@domain.cz" |
| 118 | password: "smtp-password" |
| 119 | port: 25 |
| 120 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 121 | Script approvals from client: |
Jakub Josef | bf0b73e | 2017-03-22 14:32:45 +0100 | [diff] [blame] | 122 | |
| 123 | .. code-block:: yaml |
| 124 | |
| 125 | jenkins: |
| 126 | client: |
| 127 | approved_scripts: |
| 128 | - method groovy.json.JsonSlurperClassic parseText java.lang.String |
| 129 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 130 | Script approvals: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 131 | |
| 132 | .. code-block:: yaml |
| 133 | |
| 134 | jenkins: |
| 135 | master: |
| 136 | approved_scripts: |
| 137 | - method groovy.json.JsonSlurperClassic parseText java.lang.String |
| 138 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 139 | User enforcement: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 140 | |
| 141 | .. code-block:: yaml |
| 142 | |
| 143 | jenkins: |
| 144 | master: |
| 145 | user: |
| 146 | admin: |
| 147 | api_token: xxxxxxxxxx |
| 148 | password: admin_password |
| 149 | email: admin@domain.com |
| 150 | user01: |
| 151 | api_token: xxxxxxxxxx |
| 152 | password: user_password |
| 153 | email: user01@domain.com |
| 154 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 155 | Agent (slave) role |
| 156 | ------------------ |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 157 | |
| 158 | .. code-block:: yaml |
| 159 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 160 | jenkins: |
| 161 | slave: |
| 162 | master: |
| 163 | host: jenkins.example.com |
| 164 | port: 80 |
Michael Kutý | 37a3595 | 2016-06-10 23:51:36 +0200 | [diff] [blame] | 165 | protocol: http |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 166 | user: |
| 167 | name: jenkins_slave |
| 168 | password: dexiech6AepohthaiHook2iesh7ol5ook4Ov3leid3yek6daid2ooNg3Ee2oKeYo |
| 169 | gpg: |
| 170 | keypair_id: A76882D3 |
| 171 | public_key: | |
| 172 | -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 173 | ... |
| 174 | private_key: | |
| 175 | -----BEGIN PGP PRIVATE KEY BLOCK----- |
| 176 | ... |
Ales Komarek | af967ee | 2016-08-31 19:38:50 +0200 | [diff] [blame] | 177 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 178 | Client role |
| 179 | ----------- |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 180 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 181 | Simple client with workflow job definition: |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 182 | |
| 183 | .. code-block:: yaml |
| 184 | |
| 185 | jenkins: |
| 186 | client: |
| 187 | master: |
| 188 | host: jenkins.example.com |
| 189 | port: 80 |
| 190 | protocol: http |
Ivan Berezovskiy | f28ee09 | 2019-02-12 17:16:30 +0400 | [diff] [blame] | 191 | location: |
| 192 | url: http://jenkins.example.com:80 |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 193 | job: |
| 194 | jobname: |
| 195 | type: workflow |
| 196 | param: |
| 197 | bool_param: |
| 198 | type: boolean |
| 199 | description: true/false |
| 200 | default: true |
| 201 | string_param: |
| 202 | type: string |
| 203 | description: 1 liner |
| 204 | default: default_string |
| 205 | text_param: |
| 206 | type: text |
| 207 | description: multi-liner |
| 208 | default: default_text |
Filip Pytloun | ebd4d17 | 2016-09-01 14:23:20 +0200 | [diff] [blame] | 209 | jobname_scm: |
| 210 | type: workflow-scm |
| 211 | concurrent: false |
| 212 | scm: |
| 213 | type: git |
| 214 | url: https://github.com/jenkinsci/docker.git |
| 215 | branch: master |
| 216 | script: Jenkinsfile |
| 217 | github: |
| 218 | url: https://github.com/jenkinsci/docker |
| 219 | name: "Jenkins Docker Image" |
| 220 | trigger: |
Tomáš Kukrál | a9cf2c6 | 2017-03-04 11:25:20 +0100 | [diff] [blame] | 221 | timer: |
John Doe | 645e6b0 | 2018-12-18 19:54:17 +0000 | [diff] [blame] | 222 | dependency_job_names: |
| 223 | - job1 |
| 224 | - job2 |
Tomáš Kukrál | a9cf2c6 | 2017-03-04 11:25:20 +0100 | [diff] [blame] | 225 | spec: "H H * * *" |
Filip Pytloun | ebd4d17 | 2016-09-01 14:23:20 +0200 | [diff] [blame] | 226 | github: |
| 227 | pollscm: |
| 228 | spec: "H/15 * * * *" |
| 229 | reverse: |
| 230 | projects: |
| 231 | - test1 |
| 232 | - test2 |
| 233 | state: SUCCESS |
| 234 | param: |
| 235 | bool_param: |
| 236 | type: boolean |
| 237 | description: true/false |
| 238 | default: true |
| 239 | string_param: |
| 240 | type: string |
| 241 | description: 1 liner |
| 242 | default: default_string |
| 243 | text_param: |
| 244 | type: text |
| 245 | description: multi-liner |
| 246 | default: default_text |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 247 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 248 | Inline Groovy scripts: |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 249 | |
| 250 | .. code-block:: yaml |
| 251 | |
| 252 | jenkins: |
| 253 | client: |
| 254 | job: |
| 255 | test_workflow_jenkins_simple: |
| 256 | type: workflow |
| 257 | display_name: Test jenkins simple workflow |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 258 | script: |
| 259 | content: | |
| 260 | node { |
| 261 | stage 'Stage 1' |
| 262 | echo 'Hello World 1' |
| 263 | stage 'Stage 2' |
| 264 | echo 'Hello World 2' |
| 265 | } |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 266 | test_workflow_jenkins_input: |
| 267 | type: workflow |
| 268 | display_name: Test jenkins workflow inputs |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 269 | script: |
| 270 | content: | |
| 271 | node { |
| 272 | stage 'Enter string' |
| 273 | input message: 'Enter job parameters', ok: 'OK', parameters: [ |
| 274 | string(defaultValue: 'default', description: 'Enter a string.', name: 'string'), |
| 275 | ] |
| 276 | stage 'Enter boolean' |
| 277 | input message: 'Enter job parameters', ok: 'OK', parameters: [ |
| 278 | booleanParam(defaultValue: false, description: 'Select boolean.', name: 'Bool'), |
| 279 | ] |
| 280 | stage 'Enter text' |
| 281 | input message: 'Enter job parameters', ok: 'OK', parameters: [ |
| 282 | text(defaultValue: '', description: 'Enter multiline', name: 'Multiline') |
| 283 | ] |
| 284 | } |
Ales Komarek | e5a1ed6 | 2016-08-27 12:02:48 +0200 | [diff] [blame] | 285 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 286 | GIT controlled groovy scripts: |
Ales Komarek | daf31f7 | 2016-08-29 11:00:13 +0200 | [diff] [blame] | 287 | |
| 288 | .. code-block:: yaml |
| 289 | |
| 290 | jenkins: |
| 291 | client: |
| 292 | source: |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 293 | base: |
| 294 | engine: git |
| 295 | address: repo_url |
| 296 | branch: branch |
| 297 | domain: |
| 298 | engine: git |
| 299 | address: domain_url |
| 300 | branch: branch |
Ales Komarek | daf31f7 | 2016-08-29 11:00:13 +0200 | [diff] [blame] | 301 | job: |
| 302 | test_workflow_jenkins_simple: |
| 303 | type: workflow |
| 304 | display_name: Test jenkins simple workflow |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 305 | param: |
| 306 | bool_param: |
| 307 | type: boolean |
| 308 | description: true/false |
| 309 | default: true |
| 310 | script: |
| 311 | repository: base |
| 312 | file: workflows/test_workflow_jenkins_simple.groovy |
Ales Komarek | daf31f7 | 2016-08-29 11:00:13 +0200 | [diff] [blame] | 313 | test_workflow_jenkins_input: |
| 314 | type: workflow |
| 315 | display_name: Test jenkins workflow inputs |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 316 | script: |
| 317 | repository: domain |
| 318 | file: workflows/test_workflow_jenkins_input.groovy |
| 319 | test_workflow_jenkins_input_jenkinsfile: |
| 320 | type: workflow |
| 321 | display_name: Test jenkins workflow inputs (jenknisfile) |
| 322 | script: |
| 323 | repository: domain |
| 324 | file: workflows/test_workflow_jenkins_input/Jenkinsfile |
Ales Komarek | daf31f7 | 2016-08-29 11:00:13 +0200 | [diff] [blame] | 325 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 326 | GIT controlled groovy script with shared libraries: |
Ales Komarek | 5b672fd | 2016-08-29 16:05:03 +0200 | [diff] [blame] | 327 | |
| 328 | .. code-block:: yaml |
| 329 | |
| 330 | jenkins: |
| 331 | client: |
| 332 | source: |
| 333 | base: |
| 334 | engine: git |
| 335 | address: repo_url |
| 336 | branch: branch |
| 337 | domain: |
| 338 | engine: git |
| 339 | address: domain_url |
| 340 | branch: branch |
| 341 | job: |
| 342 | test_workflow_jenkins_simple: |
| 343 | type: workflow |
| 344 | display_name: Test jenkins simple workflow |
| 345 | param: |
| 346 | bool_param: |
| 347 | type: boolean |
| 348 | description: true/false |
| 349 | default: true |
| 350 | script: |
| 351 | repository: base |
| 352 | file: workflows/test_workflow_jenkins_simple.groovy |
| 353 | libs: |
| 354 | - repository: base |
| 355 | file: macros/cookiecutter.groovy |
| 356 | - repository: base |
| 357 | file: macros/git.groovy |
Ales Komarek | daf31f7 | 2016-08-29 11:00:13 +0200 | [diff] [blame] | 358 | |
Jakub Josef | 120714d | 2017-02-09 16:29:18 +0100 | [diff] [blame] | 359 | Setting job max builds to keep (amount of last builds stored on Jenkins master) |
| 360 | |
| 361 | .. code-block:: yaml |
| 362 | |
| 363 | jenkins: |
| 364 | client: |
| 365 | job: |
| 366 | my-amazing-job: |
| 367 | type: workflow |
| 368 | discard: |
| 369 | build: |
| 370 | keep_num: 5 |
| 371 | keep_days: 5 |
| 372 | artifact: |
| 373 | keep_num: 6 |
| 374 | keep_days: 6 |
| 375 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 376 | Using job templates in similar way as in jjb. For now just |
| 377 | 1 defined param is supported: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 378 | |
| 379 | .. code-block:: yaml |
| 380 | |
| 381 | jenkins: |
| 382 | client: |
| 383 | job_template: |
| 384 | test_workflow_template: |
| 385 | name: test-{{formula}}-workflow |
| 386 | template: |
| 387 | type: workflow |
| 388 | display_name: Test jenkins {{name}} workflow |
| 389 | param: |
| 390 | repo_param: |
| 391 | type: string |
| 392 | default: repo/{{formula}} |
| 393 | script: |
| 394 | repository: base |
| 395 | file: workflows/test_formula_workflow.groovy |
| 396 | param: |
| 397 | formula: |
| 398 | - aodh |
| 399 | - linux |
| 400 | - openssh |
| 401 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 402 | Interpolating parameters for job templates: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 403 | |
Filip Pytloun | 83129fc | 2017-02-23 10:07:32 +0100 | [diff] [blame] | 404 | .. code-block:: yaml |
| 405 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 406 | _param: |
| 407 | salt_formulas: |
| 408 | - aodh |
| 409 | - git |
| 410 | - nova |
| 411 | - xorg |
| 412 | jenkins: |
| 413 | client: |
| 414 | job_template: |
| 415 | test_workflow_template: |
| 416 | name: test-{{formula}}-workflow |
| 417 | template: |
| 418 | ... |
| 419 | param: |
| 420 | formula: ${_param:salt_formulas} |
| 421 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 422 | Or simply define multiple jobs and it's parameters to |
| 423 | replace from template: |
Filip Pytloun | 83129fc | 2017-02-23 10:07:32 +0100 | [diff] [blame] | 424 | |
| 425 | .. code-block:: yaml |
| 426 | |
| 427 | jenkins: |
| 428 | client: |
| 429 | job_template: |
| 430 | test_workflow_template: |
| 431 | name: test-{{name}}-{{myparam}} |
| 432 | template: |
| 433 | ... |
| 434 | jobs: |
| 435 | - name: firstjob |
| 436 | myparam: dummy |
| 437 | - name: secondjob |
| 438 | myparam: dummyaswell |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 439 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 440 | Purging undefined jobs from Jenkins: |
Jakub Josef | 2a7739b | 2017-01-24 18:33:44 +0100 | [diff] [blame] | 441 | |
| 442 | .. code-block:: yaml |
| 443 | |
| 444 | jenkins: |
| 445 | client: |
| 446 | purge_jobs: true |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 447 | job: |
| 448 | my-amazing-job: |
| 449 | type: workflow |
Jakub Josef | 2a7739b | 2017-01-24 18:33:44 +0100 | [diff] [blame] | 450 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 451 | Plugins management from client: |
Jakub Josef | 10b4e10 | 2017-01-05 18:18:41 +0100 | [diff] [blame] | 452 | |
| 453 | .. code-block:: yaml |
| 454 | |
Jakub Josef | 10b4e10 | 2017-01-05 18:18:41 +0100 | [diff] [blame] | 455 | jenkins: |
| 456 | client: |
Alexander Evseev | cd836a1 | 2018-07-27 13:02:45 +0200 | [diff] [blame] | 457 | plugin_remove_unwanted: false |
| 458 | plugin_force_remove: false |
Jakub Josef | 10b4e10 | 2017-01-05 18:18:41 +0100 | [diff] [blame] | 459 | plugin: |
Alexander Evseev | cd836a1 | 2018-07-27 13:02:45 +0200 | [diff] [blame] | 460 | plugin1: 1.2.3 |
| 461 | plugin2: |
| 462 | plugin3: {} |
| 463 | plugin4: |
| 464 | version: 3.2.1 |
Jakub Josef | 10b4e10 | 2017-01-05 18:18:41 +0100 | [diff] [blame] | 465 | enabled: false |
Alexander Evseev | cd836a1 | 2018-07-27 13:02:45 +0200 | [diff] [blame] | 466 | plugin5: absent |
Jakub Josef | 10b4e10 | 2017-01-05 18:18:41 +0100 | [diff] [blame] | 467 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 468 | Adding plugin params to job: |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 469 | |
| 470 | .. code-block:: yaml |
| 471 | |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 472 | jenkins: |
| 473 | client: |
| 474 | job: |
| 475 | my_plugin_parametrized_job: |
| 476 | plugin_properties: |
| 477 | throttleconcurrents: |
| 478 | enabled: True |
| 479 | max_concurrent_per_node: 3 |
Vasyl Saienko | 661acf4 | 2018-01-18 10:37:07 +0200 | [diff] [blame] | 480 | max_concurrent_total: 1 |
| 481 | throttle_option: category #one of project (default or category) |
| 482 | categories: |
| 483 | - my_throuttle_category |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 484 | plugin: |
Alexander Evseev | cd836a1 | 2018-07-27 13:02:45 +0200 | [diff] [blame] | 485 | throttle-concurrents: |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 486 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 487 | LDAP configuration (depends on LDAP plugin): |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 488 | |
| 489 | .. code-block:: yaml |
| 490 | |
| 491 | jenkins: |
| 492 | client: |
| 493 | security: |
| 494 | ldap: |
| 495 | server: 1.2.3.4 |
| 496 | root_dn: dc=foo,dc=com |
| 497 | user_search_base: cn=users,cn=accounts |
| 498 | manager_dn: "" |
| 499 | manager_password: password |
| 500 | user_search: "" |
| 501 | group_search_base: "" |
| 502 | inhibit_infer_root_dn: false |
| 503 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 504 | Matrix configuration (depends on auth-matrix plugin): |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 505 | |
| 506 | .. code-block:: yaml |
| 507 | |
| 508 | jenkins: |
| 509 | client: |
| 510 | security: |
| 511 | matrix: |
Jakub Josef | 0ee470e | 2017-01-17 11:46:58 +0100 | [diff] [blame] | 512 | # set true for use ProjectMatrixAuthStrategy instead of GlobalMatrixAuthStrategy |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 513 | project_based: false |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 514 | permissions: |
| 515 | Jenkins: |
| 516 | # administrator access |
| 517 | ADMINISTER: |
| 518 | - admin |
| 519 | # read access (anonymous too) |
| 520 | READ: |
| 521 | - anonymous |
| 522 | - user1 |
| 523 | - user2 |
| 524 | # agents permissions |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 525 | MasterComputer: |
| 526 | BUILD: |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 527 | - user3 |
| 528 | # jobs permissions |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 529 | hudson: |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 530 | model: |
| 531 | Item: |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 532 | BUILD: |
Jakub Josef | 063a753 | 2017-01-11 15:48:01 +0100 | [diff] [blame] | 533 | - user4 |
| 534 | |
| 535 | `Common matrix strategies <https://github.com/arbabnazar/configuration/blob/c08a5eaf4e04a68d2481375502a926517097b253/playbooks/roles/tools_jenkins/templates/projectBasedMatrixSecurity.groovy.j2>`_ |
| 536 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 537 | Views enforcing from client: |
Jakub Josef | 7bb17ab | 2017-01-12 14:52:53 +0100 | [diff] [blame] | 538 | |
| 539 | .. code-block:: yaml |
| 540 | |
| 541 | jenkins: |
| 542 | client: |
| 543 | view: |
| 544 | my-list-view: |
| 545 | enabled: true |
| 546 | type: ListView |
Jakub Josef | 7d9fce3 | 2017-03-24 16:46:56 +0100 | [diff] [blame] | 547 | include_regex: ".*" |
Jakub Josef | 7bb17ab | 2017-01-12 14:52:53 +0100 | [diff] [blame] | 548 | my-view: |
| 549 | # set false to disable |
| 550 | enabled: true |
| 551 | type: MyView |
| 552 | |
| 553 | View specific params: |
| 554 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 555 | - ``include_regex`` for ``ListView`` and ``CategorizedJobsView`` |
| 556 | - categories for ``CategorizedJobsView`` |
Jakub Josef | 7d9fce3 | 2017-03-24 16:46:56 +0100 | [diff] [blame] | 557 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 558 | Categorized views: |
Jakub Josef | 7d9fce3 | 2017-03-24 16:46:56 +0100 | [diff] [blame] | 559 | |
| 560 | .. code-block:: yaml |
| 561 | |
| 562 | jenkins: |
| 563 | client: |
| 564 | view: |
| 565 | my-categorized-view: |
| 566 | enabled: true |
| 567 | type: CategorizedJobsView |
| 568 | include_regex: ".*" |
| 569 | categories: |
| 570 | - group_regex: "aptly-.*-nightly-testing" |
| 571 | naming_rule: "Nightly -> Testing" |
| 572 | - group_regex: "aptly-.*-nightly-production" |
| 573 | naming_rule: "Nightly -> Production" |
Jakub Josef | 7bb17ab | 2017-01-12 14:52:53 +0100 | [diff] [blame] | 574 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 575 | Credentials enforcing from client: |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 576 | |
| 577 | .. code-block:: yaml |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 578 | |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 579 | jenkins: |
| 580 | client: |
| 581 | credential: |
| 582 | cred_first: |
| 583 | username: admin |
| 584 | password: password |
| 585 | cred_second: |
| 586 | username: salt |
| 587 | password: password |
| 588 | cred_with_key: |
| 589 | username: admin |
| 590 | key: SOMESSHKEY |
Sergey Otpuschennikov | 1dd7799 | 2018-06-27 11:11:07 +0400 | [diff] [blame] | 591 | cred_with_text_secret: |
| 592 | secret: SOMETEXTSECRET |
Yuriy Taraday | 2e21e3c | 2018-02-06 20:17:58 +0400 | [diff] [blame] | 593 | cred_with_secret_file: |
| 594 | filename: somefile.json |
| 595 | content: | |
| 596 | { "Hello": "world!" } |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 597 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 598 | Users enforcing from client: |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 599 | |
| 600 | .. code-block:: yaml |
| 601 | |
| 602 | jenkins: |
| 603 | client: |
| 604 | user: |
| 605 | admin: |
| 606 | password: admin_password |
| 607 | admin: true |
| 608 | user01: |
| 609 | password: user_password |
| 610 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 611 | Node enforcing from client using JNLP launcher: |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 612 | |
| 613 | .. code-block:: yaml |
| 614 | |
| 615 | jenkins: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 616 | client: |
| 617 | node: |
| 618 | node01: |
| 619 | remote_home: /remote/home/path |
| 620 | desc: node-description |
| 621 | num_executors: 1 |
| 622 | node_mode: Normal |
| 623 | ret_strategy: Always |
| 624 | labels: |
| 625 | - example |
| 626 | - label |
| 627 | launcher: |
| 628 | type: jnlp |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 629 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 630 | Node enforcing from client using SSH launcher: |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 631 | |
| 632 | .. code-block:: yaml |
| 633 | |
| 634 | jenkins: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 635 | client: |
| 636 | node: |
| 637 | node01: |
| 638 | remote_home: /remote/home/path |
| 639 | desc: node-description |
| 640 | num_executors: 1 |
| 641 | node_mode: Normal |
| 642 | ret_strategy: Always |
| 643 | labels: |
| 644 | - example |
Vasyl Saienko | cb928a8 | 2018-01-17 15:21:28 +0200 | [diff] [blame] | 645 | - label |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 646 | launcher: |
| 647 | type: ssh |
| 648 | host: test-launcher |
| 649 | port: 22 |
| 650 | username: launcher-user |
| 651 | password: launcher-pass |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 652 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 653 | Configure Jenkins master: |
Jakub Josef | 1bb7f44 | 2017-05-26 17:02:56 +0200 | [diff] [blame] | 654 | |
| 655 | .. code-block:: yaml |
| 656 | |
| 657 | jenkins: |
| 658 | client: |
| 659 | node: |
| 660 | master: |
| 661 | num_executors: 1 |
| 662 | node_mode: Normal # or Exclusive |
| 663 | labels: |
| 664 | - example |
| 665 | - label |
| 666 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 667 | Setting node labels: |
Jakub Josef | 123be7a | 2016-12-12 16:02:36 +0100 | [diff] [blame] | 668 | |
| 669 | .. code-block:: yaml |
| 670 | |
| 671 | jenkins: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 672 | client: |
| 673 | label: |
| 674 | node-name: |
| 675 | lbl_text: label-offline |
| 676 | append: false # set true for label append instead of replace |
Jakub Josef | d8e0429 | 2016-11-28 18:02:27 +0100 | [diff] [blame] | 677 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 678 | SMTP server settings from client: |
Jakub Josef | 60cc9d2 | 2017-01-18 12:02:14 +0100 | [diff] [blame] | 679 | |
| 680 | .. code-block:: yaml |
| 681 | |
| 682 | jenkins: |
| 683 | client: |
| 684 | smtp: |
| 685 | host: "smtp.domain.com" |
| 686 | username: "user@domain.cz" |
| 687 | password: "smtp-password" |
| 688 | port: 25 |
| 689 | ssl: false |
| 690 | reply_to: reply_to@address.com |
| 691 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 692 | Jenkins admin user email enforcement from client: |
Jakub Josef | dfb288c | 2017-04-27 17:29:00 +0200 | [diff] [blame] | 693 | |
| 694 | .. code-block:: yaml |
| 695 | |
| 696 | jenkins: |
| 697 | client: |
| 698 | smtp: |
| 699 | admin_email: "My Jenkins <jenkins@myserver.com>" |
| 700 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 701 | Slack plugin configuration: |
Jakub Josef | a6d4c83 | 2017-01-19 14:06:12 +0100 | [diff] [blame] | 702 | |
| 703 | .. code-block:: yaml |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 704 | |
Jakub Josef | a6d4c83 | 2017-01-19 14:06:12 +0100 | [diff] [blame] | 705 | jenkins: |
| 706 | client: |
| 707 | slack: |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 708 | team_domain: example.com |
| 709 | token: slack-token |
| 710 | room: slack-room |
Jakub Josef | 6e0cda9 | 2017-02-14 18:01:58 +0100 | [diff] [blame] | 711 | token_credential_id: cred_id |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 712 | send_as: Some slack user |
Jakub Josef | a6d4c83 | 2017-01-19 14:06:12 +0100 | [diff] [blame] | 713 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 714 | Pipeline global libraries setup: |
Jakub Josef | 6e0cda9 | 2017-02-14 18:01:58 +0100 | [diff] [blame] | 715 | |
| 716 | .. code-block:: yaml |
| 717 | |
| 718 | jenkins: |
| 719 | client: |
| 720 | lib: |
| 721 | my-pipeline-library: |
| 722 | enabled: true |
| 723 | url: https://path-to-my-library |
| 724 | credential_id: github |
| 725 | branch: master # optional, default master |
| 726 | implicit: true # optional default true |
Jakub Josef | d8e0429 | 2016-11-28 18:02:27 +0100 | [diff] [blame] | 727 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 728 | Artifactory server enforcing: |
Jakub Josef | 0194025 | 2017-05-10 14:01:22 +0200 | [diff] [blame] | 729 | |
| 730 | .. code-block:: yaml |
| 731 | |
| 732 | jenkins: |
| 733 | client: |
| 734 | artifactory: |
| 735 | my-artifactory-server: |
| 736 | enabled: true |
| 737 | url: https://path-to-my-library |
| 738 | credential_id: github |
| 739 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 740 | Jenkins Global env properties enforcing: |
Jakub Josef | 184ee1c | 2017-11-29 16:03:09 +0100 | [diff] [blame] | 741 | |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 742 | .. code-block:: yaml |
Jakub Josef | 184ee1c | 2017-11-29 16:03:09 +0100 | [diff] [blame] | 743 | |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 744 | jenkins: |
| 745 | client: |
| 746 | globalenvprop: |
| 747 | OFFLINE_DEPLOYMENT: |
| 748 | enabled: true |
| 749 | name: "OFFLINE_DEPLOYMENT" # optional, default using dict key |
| 750 | value: "true" |
Jakub Josef | 184ee1c | 2017-11-29 16:03:09 +0100 | [diff] [blame] | 751 | |
Dmitry Burmistrov | a3f2c13 | 2018-04-10 16:24:25 +0400 | [diff] [blame] | 752 | Throttle categories management from client (requires |
| 753 | `Throttle Concurrent Builds <https://plugins.jenkins.io/throttle-concurrents>`_ |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 754 | plugin): |
Dmitry Burmistrov | a3f2c13 | 2018-04-10 16:24:25 +0400 | [diff] [blame] | 755 | |
| 756 | .. code-block:: yaml |
| 757 | |
| 758 | jenkins: |
| 759 | client: |
| 760 | throttle_category: |
| 761 | 'My First Category': |
| 762 | max_total: 2 |
| 763 | max_per_node: 1 |
| 764 | 'My Second Category': |
| 765 | max_total: 5 |
| 766 | max_per_node: 2 |
| 767 | max_per_label: |
| 768 | 'node_label_1': 1 |
| 769 | 'node_label_2': 2 |
| 770 | 'My Category To Remove: |
| 771 | enabled: false |
| 772 | |
Dmitry Burmistrov | 429b8ec | 2018-04-25 17:13:48 +0400 | [diff] [blame] | 773 | Jira sites management from client (requires |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 774 | `JIRA <https://plugins.jenkins.io/jira>`_ plugin): |
Dmitry Burmistrov | 429b8ec | 2018-04-25 17:13:48 +0400 | [diff] [blame] | 775 | |
| 776 | .. code-block:: yaml |
| 777 | |
| 778 | # Remove all sites |
| 779 | jenkins: |
| 780 | client: |
| 781 | jira: |
| 782 | enabled: False |
| 783 | |
| 784 | .. code-block:: yaml |
| 785 | |
| 786 | jenkins: |
| 787 | client: |
| 788 | jira: |
| 789 | sites: |
| 790 | 'http://my.jira.site/': |
| 791 | link_url: 'http://alternative.link/' |
| 792 | http_auth: false |
| 793 | use_wiki_notation: false |
| 794 | record_scm: false |
| 795 | disable_changelog: false |
| 796 | issue_pattern: '' |
| 797 | any_build_result: false |
| 798 | user: 'username' |
| 799 | password: 'passwd' |
| 800 | conn_timeout: 10 |
| 801 | visible_for_group: '' |
| 802 | visible_for_project: '' |
| 803 | timestamps: false |
| 804 | timestamp_format: '' |
Sergey Otpuschennikov | 74ea268 | 2018-05-21 16:35:36 +0400 | [diff] [blame] | 805 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 806 | Gerrit trigger plugin configuration: |
Sergey Otpuschennikov | 8399670 | 2017-11-23 17:10:57 +0400 | [diff] [blame] | 807 | |
| 808 | .. code-block:: yaml |
| 809 | |
| 810 | jenkins: |
| 811 | client: |
| 812 | gerrit: |
| 813 | server1: |
| 814 | host: "gerrit.domain.local" |
| 815 | port: 29418 |
| 816 | username: "jenkins" |
| 817 | email: "jenkins@domain.local" |
| 818 | auth_key_file: "/var/jenkins_home/.ssh/id_rsa" |
| 819 | frontendURL: "https://gerrit.domain.local" |
Sergey Otpuschennikov | 107c196 | 2018-06-20 13:45:04 +0400 | [diff] [blame] | 820 | build_current_patches_only: true |
| 821 | abort_new_patchsets: false |
| 822 | abort_manual_patchsets: false |
| 823 | abort_same_topic: false |
Sergey Otpuschennikov | 8399670 | 2017-11-23 17:10:57 +0400 | [diff] [blame] | 824 | authkey: | |
| 825 | SOMESSHKEY |
| 826 | server2: |
| 827 | host: "gerrit2.domain.local" |
| 828 | port: 29418 |
| 829 | username: "jenkins" |
| 830 | email: "jenkins@domain.local" |
| 831 | auth_key_file: "/var/jenkins_home/.ssh/id_rsa" |
| 832 | frontendURL: "https://gerrit2.domain.local" |
Sergey Otpuschennikov | 107c196 | 2018-06-20 13:45:04 +0400 | [diff] [blame] | 833 | build_current_patches_only: true |
| 834 | abort_new_patchsets: false |
| 835 | abort_manual_patchsets: false |
| 836 | abort_same_topic: false |
Sergey Otpuschennikov | 8399670 | 2017-11-23 17:10:57 +0400 | [diff] [blame] | 837 | authkey: | |
| 838 | SOMESSHKEY |
Dmitry Burmistrov | 429b8ec | 2018-04-25 17:13:48 +0400 | [diff] [blame] | 839 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 840 | CSRF Protection configuration: |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 841 | |
| 842 | .. code-block:: yaml |
| 843 | |
| 844 | jenkins: |
| 845 | client: |
| 846 | security: |
| 847 | csrf: |
| 848 | enabled: true |
| 849 | proxy_compat: false |
| 850 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 851 | Agent to Master Access Control: |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 852 | |
| 853 | .. code-block:: yaml |
| 854 | |
| 855 | jenkins: |
| 856 | client: |
| 857 | security: |
| 858 | agent2master: |
| 859 | enabled: true |
| 860 | whitelisted: '' |
| 861 | file_path_rules: '' |
| 862 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 863 | Content Security Policy configuration: |
Dmitry Burmistrov | 2953edf | 2018-05-24 11:32:54 +0400 | [diff] [blame] | 864 | |
| 865 | .. code-block:: yaml |
| 866 | |
| 867 | jenkins: |
| 868 | client: |
| 869 | security: |
| 870 | csp: "sandbox; default-src 'none'; img-src 'self'; style-src 'self';" |
| 871 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 872 | Usage |
| 873 | ===== |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 874 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 875 | #. Generate password hash: |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 876 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 877 | .. code-block:: bash |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 878 | |
| 879 | echo -n "salt{plainpassword}" | openssl dgst -sha256 |
| 880 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 881 | #. Place in the configuration ``salt:hashpassword``. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 882 | |
Ales Komarek | ffe8bb2 | 2017-02-09 11:10:16 +0100 | [diff] [blame] | 883 | |
OlgaGusarenko | f20d94d | 2018-07-30 18:48:25 +0300 | [diff] [blame] | 884 | Read more |
| 885 | ========= |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 886 | |
| 887 | * https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins |