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-deployment' |
| 22 | |
| 23 | project: 'engine-deployment' |
| 24 | |
| 25 | stream: |
| 26 | - 'master': |
| 27 | branch: '{stream}' |
| 28 | gated-projects: 'infra\/engine' |
| 29 | |
| 30 | environment-type: |
| 31 | - online: |
| 32 | disabled: false |
| 33 | execution-mode: online-deployment |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame] | 34 | successful: false |
| 35 | failed: false |
| 36 | unstable: false |
| 37 | notbuilt: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 38 | - offline: |
| 39 | disabled: false |
| 40 | execution-mode: offline-deployment |
Fatih Degirmenci | fea7fd0 | 2020-03-18 07:58:29 +0000 | [diff] [blame^] | 41 | successful: false |
| 42 | failed: false |
| 43 | unstable: false |
| 44 | notbuilt: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 45 | |
| 46 | distro: |
| 47 | - ubuntu1804 |
| 48 | |
| 49 | cloud: |
| 50 | - city: |
| 51 | openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap' |
| 52 | |
| 53 | jobs: |
| 54 | - 'engine-verify-{environment-type}-{distro}-{cloud}-{stream}' |
| 55 | - 'engine-verify-packaging-{distro}-{stream}' |
| 56 | |
| 57 | - job-template: |
| 58 | name: 'engine-verify-{environment-type}-{distro}-{cloud}-{stream}' |
| 59 | |
| 60 | project-type: multijob |
| 61 | |
| 62 | disabled: '{obj:disabled}' |
| 63 | |
| 64 | concurrent: true |
| 65 | |
| 66 | parameters: |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 67 | - string: |
| 68 | name: EXECUTION_MODE |
| 69 | default: '{execution-mode}' |
| 70 | description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment' |
| 71 | - string: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 72 | name: DISTRO |
| 73 | default: '{distro}' |
| 74 | description: 'Distribution to use for configuring target nodes (networking etc.)' |
| 75 | - string: |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 76 | name: VERBOSITY |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame] | 77 | default: 'true' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 78 | description: 'Verbosity setting for the engine - true or false - default is false' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 79 | - string: |
| 80 | name: NORDIX_ARM_PUBLIC_IP |
| 81 | default: '91.106.198.25' |
| 82 | description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name' |
| 83 | - string: |
| 84 | name: NORDIX_ARM_HTTPS_URL |
| 85 | default: 'https://artifactory.nordix.org/artifactory' |
| 86 | description: 'URL to Nordix Artifactory' |
| 87 | - string: |
| 88 | name: NORDIX_ARM_REPO |
| 89 | default: 'nordix-kubernetes' |
| 90 | description: 'Name of the repository to upload and download artifact to/from. Depends on the stack' |
| 91 | - string: |
| 92 | name: NORDIX_ARTIFACT_URL |
| 93 | default: "$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/installer/oss/change/$GERRIT_CHANGE_NUMBER/k8s-installer-ubuntu1804.bsx" |
| 94 | description: 'Name of the repository to upload and download artifact to/from. Depends on the stack' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 95 | - label: |
| 96 | name: SLAVE_LABEL |
| 97 | default: 'engine-master-{environment-type}-{distro}' |
| 98 | description: 'Slave label to schedule this job on.' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 99 | - project-parameters: |
| 100 | project: $GERRIT_PROJECT |
| 101 | branch: '{branch}' |
| 102 | description: 'The project and branch which the change is proposed for' |
| 103 | - nordix-gerrit-parameters |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 104 | |
| 105 | properties: |
| 106 | - logrotate |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 107 | - throttle: |
| 108 | max-per-node: 1 |
| 109 | max-total: 3 |
| 110 | option: project |
| 111 | |
| 112 | wrappers: |
| 113 | - build-timeout: |
| 114 | timeout: 180 |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 115 | - mask-passwords |
| 116 | - fix-workspace-permissions |
| 117 | - openstack: |
| 118 | single-use: True |
| 119 | |
| 120 | scm: |
| 121 | - git-scm-gerrit: |
| 122 | ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| 123 | branch: '{branch}' |
| 124 | refspec: $GERRIT_REFSPEC |
| 125 | wipe_workspace: true |
| 126 | clean_before: false |
| 127 | |
| 128 | triggers: |
| 129 | - gerrit: |
| 130 | server-name: 'Nordix Gerrit' |
| 131 | trigger-on: |
| 132 | - patchset-created-event: |
| 133 | exclude-drafts: 'false' |
| 134 | exclude-trivial-rebase: 'false' |
| 135 | exclude-no-code-change: 'false' |
| 136 | - draft-published-event |
| 137 | - comment-added-contains-event: |
| 138 | comment-contains-value: 'recheck' |
| 139 | - comment-added-contains-event: |
| 140 | comment-contains-value: 'reverify' |
| 141 | projects: |
| 142 | - project-compare-type: 'REG_EXP' |
| 143 | project-pattern: '{gated-projects}' |
| 144 | branches: |
| 145 | - branch-compare-type: 'ANT' |
| 146 | branch-pattern: '**/{branch}' |
| 147 | disable-strict-forbidden-file-verification: 'true' |
| 148 | forbidden-file-paths: |
| 149 | - compare-type: ANT |
| 150 | pattern: 'docs/**' |
| 151 | skip-vote: |
| 152 | successful: '{obj:successful}' |
| 153 | failed: '{obj:failed}' |
| 154 | unstable: '{obj:unstable}' |
| 155 | notbuilt: '{obj:notbuilt}' |
| 156 | custom-url: '* $JOB_NAME $BUILD_URL' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 157 | readable-message: 'true' |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 158 | |
| 159 | builders: |
| 160 | - multijob: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 161 | name: packaging |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 162 | condition: SUCCESSFUL |
| 163 | execution-type: PARALLEL |
| 164 | projects: |
| 165 | - name: 'engine-verify-packaging-{distro}-{stream}' |
| 166 | current-parameters: true |
| 167 | node-parameters: true |
| 168 | kill-phase-on: FAILURE |
| 169 | abort-all-job: true |
| 170 | - multijob: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 171 | name: "{environment-type} deployment and testing" |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 172 | condition: SUCCESSFUL |
| 173 | execution-type: PARALLEL |
| 174 | projects: |
Fatih Degirmenci | 377b007 | 2020-03-13 13:05:06 +0000 | [diff] [blame] | 175 | - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-virtual-master' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 176 | current-parameters: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 177 | node-parameters: false |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 178 | predefined-parameters: | |
| 179 | GIT_BASE_SSH=$GIT_BASE_SSH |
| 180 | GERRIT_PROJECT=$GERRIT_PROJECT |
| 181 | GERRIT_BRANCH=$GERRIT_BRANCH |
| 182 | GERRIT_REFSPEC=$GERRIT_REFSPEC |
| 183 | GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE |
| 184 | GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID |
| 185 | GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER |
| 186 | PROJECT=$GERRIT_PROJECT |
| 187 | BRANCH=$BRANCH |
| 188 | NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP |
| 189 | NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL |
| 190 | EXECUTION_MODE=$EXECUTION_MODE |
| 191 | VERBOSITY=$VERBOSITY |
| 192 | DISTRO=$DISTRO |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 193 | kill-phase-on: FAILURE |
Fatih Degirmenci | 0861dce | 2020-03-17 23:16:49 +0000 | [diff] [blame] | 194 | abort-all-job: false |
Fatih Degirmenci | 377b007 | 2020-03-13 13:05:06 +0000 | [diff] [blame] | 195 | - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-cloud-master' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 196 | current-parameters: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 197 | node-parameters: false |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 198 | predefined-parameters: | |
| 199 | GIT_BASE_SSH=$GIT_BASE_SSH |
| 200 | GERRIT_PROJECT=$GERRIT_PROJECT |
| 201 | GERRIT_BRANCH=$GERRIT_BRANCH |
| 202 | GERRIT_REFSPEC=$GERRIT_REFSPEC |
| 203 | GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE |
| 204 | GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID |
| 205 | GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER |
| 206 | PROJECT=$GERRIT_PROJECT |
| 207 | BRANCH=$BRANCH |
| 208 | NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP |
| 209 | NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL |
| 210 | EXECUTION_MODE=$EXECUTION_MODE |
| 211 | VERBOSITY=$VERBOSITY |
| 212 | DISTRO=$DISTRO |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 213 | kill-phase-on: FAILURE |
Fatih Degirmenci | 0861dce | 2020-03-17 23:16:49 +0000 | [diff] [blame] | 214 | abort-all-job: false |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 215 | |
| 216 | - job-template: |
| 217 | name: 'engine-verify-packaging-{distro}-{stream}' |
| 218 | |
| 219 | disabled: '{obj:disabled}' |
| 220 | |
| 221 | concurrent: true |
| 222 | |
| 223 | properties: |
| 224 | - logrotate |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 225 | - throttle: |
| 226 | max-per-node: 1 |
| 227 | max-total: 3 |
| 228 | option: project |
| 229 | |
| 230 | wrappers: |
| 231 | - build-timeout: |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 232 | timeout: 70 |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 233 | - credentials-binding: |
| 234 | - username-password-separated: |
| 235 | credential-id: 'nordix-cicd-arm-credentials' |
| 236 | username: NORDIX_ARM_USERNAME |
| 237 | password: NORDIX_ARM_TOKEN |
| 238 | - mask-passwords |
| 239 | - fix-workspace-permissions |
Fatih Degirmenci | 471f8d9 | 2020-03-13 12:18:42 +0000 | [diff] [blame] | 240 | |
| 241 | scm: |
| 242 | - git-scm-gerrit: |
| 243 | ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| 244 | branch: '{branch}' |
| 245 | refspec: $GERRIT_REFSPEC |
| 246 | wipe_workspace: true |
| 247 | clean_before: false |
| 248 | |
| 249 | builders: |
Fatih Degirmenci | 2683ff2 | 2020-03-17 16:00:27 +0000 | [diff] [blame] | 250 | - 'engine-wait-pkg-mgr-macro' |
Fatih Degirmenci | 79e736b | 2020-03-13 16:24:37 +0000 | [diff] [blame] | 251 | - 'engine-generate-ssh-keypair-macro' |
| 252 | - 'engine-packaging-macro' |
| 253 | - 'engine-upload-artifact-macro' |