blob: eb7f1d4e20a003125132bf6e9b4bcda971d40683 [file] [log] [blame]
Fatih Degirmenci471f8d92020-03-13 12:18:42 +00001---
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 Degirmenci2683ff22020-03-17 16:00:27 +000034 successful: false
35 failed: false
36 unstable: false
37 notbuilt: false
Fatih Degirmenci471f8d92020-03-13 12:18:42 +000038 - offline:
39 disabled: false
40 execution-mode: offline-deployment
Fatih Degirmencifea7fd02020-03-18 07:58:29 +000041 successful: false
42 failed: false
43 unstable: false
44 notbuilt: false
Fatih Degirmenci471f8d92020-03-13 12:18:42 +000045
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 Degirmenci471f8d92020-03-13 12:18:42 +000067 - 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 Degirmenci79e736b2020-03-13 16:24:37 +000072 name: DISTRO
73 default: '{distro}'
74 description: 'Distribution to use for configuring target nodes (networking etc.)'
75 - string:
Fatih Degirmenci471f8d92020-03-13 12:18:42 +000076 name: VERBOSITY
Fatih Degirmenci2683ff22020-03-17 16:00:27 +000077 default: 'true'
Fatih Degirmenci471f8d92020-03-13 12:18:42 +000078 description: 'Verbosity setting for the engine - true or false - default is false'
Fatih Degirmenci79e736b2020-03-13 16:24:37 +000079 - 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 Degirmenci471f8d92020-03-13 12:18:42 +000095 - label:
96 name: SLAVE_LABEL
97 default: 'engine-master-{environment-type}-{distro}'
98 description: 'Slave label to schedule this job on.'
Fatih Degirmenci79e736b2020-03-13 16:24:37 +000099 - 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 Degirmenci471f8d92020-03-13 12:18:42 +0000104
105 properties:
106 - logrotate
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000107 - throttle:
108 max-per-node: 1
109 max-total: 3
110 option: project
111
112 wrappers:
113 - build-timeout:
114 timeout: 180
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000115 - 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 Degirmenci79e736b2020-03-13 16:24:37 +0000157 readable-message: 'true'
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000158
159 builders:
160 - multijob:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000161 name: packaging
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000162 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 Degirmenci79e736b2020-03-13 16:24:37 +0000171 name: "{environment-type} deployment and testing"
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000172 condition: SUCCESSFUL
173 execution-type: PARALLEL
174 projects:
Fatih Degirmenci377b0072020-03-13 13:05:06 +0000175 - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-virtual-master'
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000176 current-parameters: false
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000177 node-parameters: false
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000178 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 Degirmenci471f8d92020-03-13 12:18:42 +0000193 kill-phase-on: FAILURE
Fatih Degirmenci0861dce2020-03-17 23:16:49 +0000194 abort-all-job: false
Fatih Degirmenci377b0072020-03-13 13:05:06 +0000195 - name: 'engine-verify-{environment-type}-deploy-test-{distro}-city-cloud-master'
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000196 current-parameters: false
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000197 node-parameters: false
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000198 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 Degirmenci471f8d92020-03-13 12:18:42 +0000213 kill-phase-on: FAILURE
Fatih Degirmenci0861dce2020-03-17 23:16:49 +0000214 abort-all-job: false
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000215
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 Degirmenci471f8d92020-03-13 12:18:42 +0000225 - throttle:
226 max-per-node: 1
227 max-total: 3
228 option: project
229
230 wrappers:
231 - build-timeout:
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000232 timeout: 70
Fatih Degirmenci471f8d92020-03-13 12:18:42 +0000233 - 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 Degirmenci471f8d92020-03-13 12:18:42 +0000240
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 Degirmenci2683ff22020-03-17 16:00:27 +0000250 - 'engine-wait-pkg-mgr-macro'
Fatih Degirmenci79e736b2020-03-13 16:24:37 +0000251 - 'engine-generate-ssh-keypair-macro'
252 - 'engine-packaging-macro'
253 - 'engine-upload-artifact-macro'