Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 1 | --- |
| 2 | # |
| 3 | # ============LICENSE_START======================================================= |
| 4 | # Copyright (C) 2019 Nordix Foundation. |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
| 20 | |
| 21 | #-------------------------------------------------------------------------------------- |
| 22 | # The jobs declared in this JJB configuration file are used for verifying patches |
| 23 | # that are sent to the repositories below |
| 24 | # - cloud-infra/engine |
| 25 | # |
| 26 | # These jobs verify changes that |
| 27 | # - implement new features or fix bugs for the deployment framework, engine, itself |
| 28 | # - implement new features or fix bugs to the playbooks and roles used for utilizing |
| 29 | # open source components such as bifrost, kubespray, and kolla-ansible |
| 30 | # - bump versions of open source components or the scenarios |
| 31 | # |
| 32 | # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604. |
| 33 | # The slaves have |
| 34 | # - Ubuntu1604 as the base distro |
| 35 | # - nested virtualization |
| 36 | # - internet access |
| 37 | # - passwordless sudo |
| 38 | # - 16 CPUs/32GB RAM/200 GB Disk |
| 39 | # - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl |
| 40 | # gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre |
| 41 | # |
| 42 | # The slaves should not have a cloud infra scenario deployed on them. |
| 43 | #-------------------------------------------------------------------------------------- |
| 44 | |
| 45 | - project: |
| 46 | name: 'nolabs-booking' |
| 47 | |
| 48 | project: 'infra/engine' |
| 49 | |
| 50 | stream: |
| 51 | - 'master': |
| 52 | branch: '{stream}' |
Fatih Degirmenci | 346bfa8 | 2019-10-01 20:13:47 +0200 | [diff] [blame] | 53 | slave-label: 'nolabs-booking-slave' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 54 | build-timeout: 60 |
Fatih Degirmenci | 346bfa8 | 2019-10-01 20:13:47 +0200 | [diff] [blame] | 55 | # slave-label: 'vpod-deploy-ubuntu1804' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 56 | |
| 57 | booking-phase: |
| 58 | - 'handle' |
| 59 | - 'delete' |
| 60 | |
| 61 | target-site: |
| 62 | - 'test': |
Fatih Degirmenci | c4e4549 | 2019-10-01 18:30:27 +0200 | [diff] [blame] | 63 | api-tokens-endpoint: 'http://188.212.108.245/api/tokens' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 64 | api-users-endpoint: 'http://188.212.108.245/api/users' |
| 65 | api-bookings-endpoint: 'http://188.212.108.245/api/bookings' |
| 66 | - 'production': |
Fatih Degirmenci | c4e4549 | 2019-10-01 18:30:27 +0200 | [diff] [blame] | 67 | api-tokens-endpoint: 'https://labs.nordix.org/api/tokens' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 68 | api-users-endpoint: 'https://labs.nordix.org/api/users' |
| 69 | api-bookings-endpoint: 'https://labs.nordix.org/api/bookings' |
| 70 | |
| 71 | jobs: |
| 72 | - 'nolabs-{booking-phase}-booking-{target-site}site-{stream}' |
| 73 | |
| 74 | - job-template: |
| 75 | name: 'nolabs-{booking-phase}-booking-{target-site}site-{stream}' |
| 76 | |
Fatih Degirmenci | 346bfa8 | 2019-10-01 20:13:47 +0200 | [diff] [blame] | 77 | node: '{slave-label}' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 78 | |
| 79 | concurrent: true |
| 80 | |
| 81 | parameters: |
| 82 | - project-parameters: |
| 83 | project: '{project}' |
| 84 | branch: '{branch}' |
| 85 | - nordix-gerrit-parameters |
Fatih Degirmenci | 41a9ddd | 2019-10-01 17:52:34 +0200 | [diff] [blame] | 86 | - string: |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 87 | name: TARGET_SITE |
| 88 | default: '{target-site}' |
| 89 | description: 'Target site to handle the bookings for.' |
Fatih Degirmenci | 346bfa8 | 2019-10-01 20:13:47 +0200 | [diff] [blame] | 90 | # - label: |
| 91 | # name: SLAVE_LABEL |
| 92 | # default: '{slave-label}' |
| 93 | # description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use.' |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 94 | - string: |
| 95 | name: BOOKING_PHASE |
| 96 | default: '{booking-phase}' |
| 97 | description: 'Phase of the booking.' |
| 98 | - string: |
| 99 | name: BOOKING_ID |
| 100 | default: 0 |
| 101 | description: 'ID of the booking to handle. Default is 0 which is a non-existent booking to prevent running the job by mistake.' |
| 102 | - string: |
| 103 | name: DEPLOY_SCENARIO |
| 104 | default: 'k8-mycoolplugin-mycoolfeature' |
| 105 | description: 'Scenario to deploy for the booking. Default is a non-existent scenario to prevent running the job by mistake.' |
| 106 | - string: |
Fatih Degirmenci | c4e4549 | 2019-10-01 18:30:27 +0200 | [diff] [blame] | 107 | name: NOLABS_API_TOKENS_ENDPOINT |
| 108 | default: '{api-tokens-endpoint}' |
| 109 | description: 'API endpoint for tokens.' |
| 110 | - string: |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 111 | name: NOLABS_API_USERS_ENDPOINT |
| 112 | default: '{api-users-endpoint}' |
| 113 | description: 'API endpoint for users.' |
| 114 | - string: |
| 115 | name: NOLABS_API_BOOKINGS_ENDPOINT |
| 116 | default: '{api-bookings-endpoint}' |
| 117 | description: 'API endpoint for bookings.' |
| 118 | - string: |
| 119 | name: NOLABS_USER_SSHPUBKEY |
| 120 | default: '/tmp/nolabs/id_rsa.pub' |
| 121 | description: 'SSH public key for the user who created the booking.' |
| 122 | - string: |
| 123 | name: NOLABS_VENV |
| 124 | default: '/tmp/nolabs/.venv' |
| 125 | description: 'Python virtualenv location to use.' |
| 126 | - string: |
| 127 | name: GERRIT_REFSPEC |
| 128 | default: 'refs/changes/79/2079/8' |
| 129 | description: 'Refspec to checkout' |
| 130 | - string: |
| 131 | name: HEAT_ENVIRONMENT_FILE |
| 132 | default: 'https://gerrit.nordix.org/gitweb?p=infra/engine.git;a=blob_plain;f=engine/provisioner/heat/playbooks/roles/install-configure-heat/files/heat-environment.yaml;h=401e1c4f547e9a2631e68d800cbcadef81b85641;hb=70df134c93b7ca3232ae723c3de98ad2b0299728' |
| 133 | description: 'Using a special heat environment file until the change gets merged.' |
| 134 | |
| 135 | properties: |
| 136 | - logrotate |
Fatih Degirmenci | 346bfa8 | 2019-10-01 20:13:47 +0200 | [diff] [blame] | 137 | # - build-blocker: |
| 138 | # use-build-blocker: true |
| 139 | # blocking-jobs: |
| 140 | # - 'cloud-infra-verify-engine-.*' |
| 141 | # - 'cloud-infra-verify-scenario-.*' |
| 142 | # - 'cloud-infra-periodic-engine-.*' |
| 143 | # - 'k8-.*' |
| 144 | # - 'nolabs-.*' |
| 145 | # block-level: 'NODE' |
| 146 | # - throttle: |
| 147 | # max-per-node: 1 |
| 148 | # max-total: 10 |
| 149 | # option: project |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 150 | |
| 151 | wrappers: |
| 152 | - credentials-binding: |
| 153 | - file: |
Fatih Degirmenci | 4845071 | 2019-10-01 18:06:23 +0200 | [diff] [blame] | 154 | credential-id: nordix-nolabs-openrcfile-city-karlskrona-defaultproject |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 155 | variable: OPENRC_FILE |
| 156 | - username-password-separated: |
Fatih Degirmenci | 4845071 | 2019-10-01 18:06:23 +0200 | [diff] [blame] | 157 | credential-id: nordix-nolabs-jenkins-api-credentials |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 158 | username: NOLABS_API_USERNAME |
| 159 | password: NOLABS_API_PASSWORD |
| 160 | - mask-passwords |
| 161 | - build-timeout: |
| 162 | timeout: '{build-timeout}' |
| 163 | - fix-workspace-permissions |
Fatih Degirmenci | 60ad692 | 2019-10-02 09:50:24 +0200 | [diff] [blame] | 164 | - openstack: |
| 165 | single-use: True |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 166 | |
| 167 | scm: |
| 168 | - git-scm: |
| 169 | ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| 170 | branch: '{branch}' |
| 171 | refspec: '' |
| 172 | wipe_workspace: true |
| 173 | clean_before: false |
| 174 | |
| 175 | builders: |
Fatih Degirmenci | f1e1b0b | 2019-10-01 18:59:20 +0200 | [diff] [blame] | 176 | - description-setter: |
| 177 | description: $BOOKING_ID | $DEPLOY_SCENARIO |
Fatih Degirmenci | e921738 | 2019-10-01 16:41:46 +0200 | [diff] [blame] | 178 | - '{booking-phase}booking-macro' |
| 179 | |
| 180 | # vim: set ts=2 sw=2 expandtab: |