Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 1 | --- |
| 2 | # ============LICENSE_START======================================================= |
| 3 | # Copyright (C) 2019 Nordix Foundation. |
| 4 | # ================================================================================ |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | # SPDX-License-Identifier: Apache-2.0 |
| 18 | # ============LICENSE_END========================================================= |
| 19 | |
| 20 | - project: |
| 21 | name: 'engine-verify-online-deploy-test' |
| 22 | |
| 23 | project: 'engine-verify-online-deploy-test' |
| 24 | |
| 25 | stream: |
| 26 | - 'master': |
| 27 | branch: '{stream}' |
| 28 | |
| 29 | phase: |
| 30 | - deploy |
| 31 | - test |
| 32 | |
| 33 | type: |
| 34 | - virtual: |
| 35 | provisioner-type: 'bifrost' |
| 36 | slave-type: 'vpod' |
| 37 | - cloud: |
| 38 | provisioner-type: 'heat' |
| 39 | slave-type: 'jumphost' |
| 40 | |
| 41 | distro: |
| 42 | - ubuntu1804 |
| 43 | |
| 44 | cloud: |
| 45 | - city: |
| 46 | openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap' |
| 47 | |
| 48 | jobs: |
| 49 | - 'engine-verify-online-deploy-test-{distro}-{cloud}-{type}-{stream}' |
| 50 | - 'engine-verify-online-{phase}-{distro}-{cloud}-{type}-{stream}' |
| 51 | |
| 52 | - job-template: |
| 53 | name: 'engine-verify-online-deploy-test-{distro}-{cloud}-{type}-{stream}' |
| 54 | |
| 55 | project-type: multijob |
| 56 | |
| 57 | disabled: '{obj:disabled}' |
| 58 | |
| 59 | concurrent: true |
| 60 | |
| 61 | parameters: |
| 62 | - project-parameters: |
| 63 | project: $GERRIT_PROJECT |
| 64 | branch: '{branch}' |
| 65 | description: 'The project and branch which the change is proposed for' |
| 66 | - label: |
| 67 | name: SLAVE_LABEL |
| 68 | default: 'engine-{slave-type}-online-{distro}' |
| 69 | description: 'Slave label to schedule this job on.' |
| 70 | - string: |
| 71 | name: PROVISIONER_TYPE |
| 72 | default: '{provisioner-type}' |
| 73 | description: 'Provisioner type to use' |
| 74 | - string: |
| 75 | name: HEAT_ENVIRONMENT_FILENAME |
| 76 | default: 'heat-environment-{cloud}-{distro}.yaml' |
| 77 | description: 'Name of heat-environment file to use.' |
| 78 | - string: |
| 79 | name: STACK_NAME |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 80 | default: "nordix-cicd-verify-engine-online-{distro}-$BUILD_NUMBER" |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 81 | description: 'Name of the created stack' |
| 82 | - string: |
| 83 | name: KEYPAIR_NAME |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 84 | default: "keypair-nordix-cicd-verify-online-engine-{distro}-$BUILD_NUMBER" |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 85 | description: 'Name of the created keypair' |
| 86 | - string: |
| 87 | name: USE_PREBUILT_DEPLOYMENT_IMAGE |
| 88 | default: 'true' |
| 89 | description: 'Use prebuilt deployment image while running as part of CI/CD' |
| 90 | - string: |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 91 | name: TEST_REPO_URL |
| 92 | default: 'https://gerrit.nordix.org/infra/test.git' |
| 93 | description: 'URL to clone the test repo from' |
| 94 | - string: |
| 95 | name: TEST_FW |
| 96 | default: 'functest' |
| 97 | description: 'Test framework to use' |
| 98 | - string: |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 99 | name: TEST_SUITE |
| 100 | default: 'healthcheck' |
| 101 | description: 'Test suite to run' |
| 102 | - string: |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 103 | name: DELETE_STACK |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 104 | default: 'true' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 105 | description: 'Delete the stack upon completion of the build' |
| 106 | |
| 107 | properties: |
| 108 | - logrotate |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 109 | - throttle: |
| 110 | max-per-node: 1 |
| 111 | max-total: 3 |
| 112 | option: project |
| 113 | |
| 114 | wrappers: |
| 115 | - build-timeout: |
| 116 | timeout: 180 |
| 117 | - credentials-binding: |
| 118 | - file: |
| 119 | credential-id: '{openrc-credentials-file}' |
| 120 | variable: OPENRC_FILE |
| 121 | - username-password-separated: |
| 122 | credential-id: 'nordix-cicd-arm-credentials' |
| 123 | username: NORDIX_ARM_USERNAME |
| 124 | password: NORDIX_ARM_TOKEN |
| 125 | - mask-passwords |
| 126 | - fix-workspace-permissions |
| 127 | - openstack: |
| 128 | single-use: True |
| 129 | |
| 130 | scm: |
| 131 | - git-scm-gerrit: |
| 132 | ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| 133 | branch: '{branch}' |
| 134 | refspec: $GERRIT_REFSPEC |
| 135 | wipe_workspace: true |
| 136 | clean_before: false |
| 137 | |
| 138 | builders: |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 139 | - 'engine-wait-pkg-mgr-macro' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 140 | - 'engine-generate-ssh-keypair-macro' |
| 141 | - 'engine-download-artifact-macro' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 142 | - multijob: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 143 | name: "Online Deployment on {type} instances" |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 144 | condition: SUCCESSFUL |
| 145 | execution-type: PARALLEL |
| 146 | projects: |
| 147 | - name: 'engine-verify-online-deploy-{distro}-city-{type}-master' |
| 148 | current-parameters: true |
| 149 | node-parameters: true |
| 150 | kill-phase-on: FAILURE |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 151 | abort-all-job: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 152 | - multijob: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 153 | name: "Online Testing on {type} instances" |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 154 | condition: SUCCESSFUL |
| 155 | execution-type: PARALLEL |
| 156 | projects: |
| 157 | - name: 'engine-verify-online-test-{distro}-city-{type}-master' |
| 158 | current-parameters: true |
| 159 | node-parameters: true |
| 160 | kill-phase-on: FAILURE |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame^] | 161 | abort-all-job: false |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 162 | - conditional-step: |
| 163 | condition-kind: and |
| 164 | condition-operands: |
| 165 | - condition-kind: strings-match |
| 166 | condition-string1: $DELETE_STACK |
| 167 | condition-string2: true |
| 168 | - condition-kind: strings-match |
| 169 | condition-string1: $PROVISIONER_TYPE |
| 170 | condition-string2: heat |
| 171 | on-evaluation-failure: dont-run |
| 172 | steps: |
| 173 | - 'engine-delete-stack-macro' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 174 | |
| 175 | - job-template: |
| 176 | name: 'engine-verify-online-{phase}-{distro}-{cloud}-{type}-{stream}' |
| 177 | |
| 178 | disabled: '{obj:disabled}' |
| 179 | |
| 180 | concurrent: true |
| 181 | |
| 182 | properties: |
| 183 | - logrotate |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 184 | - throttle: |
| 185 | max-per-node: 1 |
| 186 | max-total: 3 |
| 187 | option: project |
| 188 | |
| 189 | wrappers: |
| 190 | - build-timeout: |
| 191 | timeout: 180 |
| 192 | - credentials-binding: |
| 193 | - file: |
| 194 | credential-id: '{openrc-credentials-file}' |
| 195 | variable: OPENRC_FILE |
| 196 | - username-password-separated: |
| 197 | credential-id: 'nordix-cicd-arm-credentials' |
| 198 | username: NORDIX_ARM_USERNAME |
| 199 | password: NORDIX_ARM_TOKEN |
| 200 | - mask-passwords |
| 201 | - fix-workspace-permissions |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 202 | |
| 203 | scm: |
| 204 | - git-scm-gerrit: |
| 205 | ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| 206 | branch: '{branch}' |
| 207 | refspec: $GERRIT_REFSPEC |
| 208 | wipe_workspace: true |
| 209 | clean_before: false |
| 210 | |
| 211 | builders: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 212 | - 'engine-{phase}-macro' |