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