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 |
| 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 Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame^] | 90 | Jenkins slave |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 91 | |
| 92 | .. code-block:: yaml |
| 93 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame^] | 94 | 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 Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 110 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame^] | 111 | Usage |
| 112 | ===== |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 113 | |
Ales Komarek | 4c0bab1 | 2016-01-22 12:10:50 +0100 | [diff] [blame^] | 114 | Generate password hash: |
| 115 | |
| 116 | .. code-block:: bash |
| 117 | |
| 118 | echo -n "salt{plainpassword}" | openssl dgst -sha256 |
| 119 | |
| 120 | Place in the configuration ``salt:hashpassword``. |
Filip Pytloun | 8bfd2bf | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 121 | |
| 122 | Read more |
| 123 | ========= |
| 124 | |
| 125 | * https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins |