Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | ======= |
| 2 | Jenkins |
| 3 | ======= |
| 4 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 5 | Jenkins is an application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 6 | |
| 7 | Available states |
| 8 | ================ |
| 9 | |
| 10 | .. contents:: |
| 11 | :local: |
| 12 | |
| 13 | ``jenkins.master`` |
| 14 | ------------------ |
| 15 | |
| 16 | Setup jenkins master |
| 17 | |
| 18 | ``jenkins.slave`` |
| 19 | ----------------- |
| 20 | |
| 21 | Setup jenkins slave |
| 22 | |
| 23 | ``jenkins.job_builder`` |
| 24 | ----------------------- |
| 25 | |
| 26 | Setup jenkins job builder |
| 27 | |
| 28 | Available metadata |
| 29 | ================== |
| 30 | |
| 31 | .. contents:: |
| 32 | :local: |
| 33 | |
| 34 | ``metadata.jenkins.master.single`` |
| 35 | ---------------------------------- |
| 36 | |
| 37 | Setup single-node master |
| 38 | |
| 39 | |
| 40 | ``metadata.jenkins.slave.single`` |
| 41 | --------------------------------- |
| 42 | |
| 43 | Setup Jenkins slave |
| 44 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 45 | Example pillars |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 46 | =============== |
| 47 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 48 | Jenkins master |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 49 | |
| 50 | .. code-block:: yaml |
| 51 | |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 52 | 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 Pytloun | 52b9c2c | 2016-01-28 13:45:57 +0100 | [diff] [blame^] | 69 | # Do not manage config.xml from Salt, use UI instead |
| 70 | no_config: true |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 71 | 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 Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 92 | Jenkins slave |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 93 | |
| 94 | .. code-block:: yaml |
| 95 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 96 | 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 Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 112 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 113 | Usage |
| 114 | ===== |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 115 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame] | 116 | Generate password hash: |
| 117 | |
| 118 | .. code-block:: bash |
| 119 | |
| 120 | echo -n "salt{plainpassword}" | openssl dgst -sha256 |
| 121 | |
| 122 | Place in the configuration ``salt:hashpassword``. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 123 | |
| 124 | Read more |
| 125 | ========= |
| 126 | |
| 127 | * https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins |