engine: Lay down basic structure for verify jobs
[infra/cicd.git] / jjb / engine / engine-verify-online-deploy-test.yaml
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
80           default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
81           description: 'Name of the created stack'
82       - string:
83           name: KEYPAIR_NAME
84           default: "keypair-nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
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:
91           name: TEST_SUITE
92           default: 'healthcheck'
93           description: 'Test suite to run'
94       - string:
95           name: YARDSTICK_DISPATCHER
96           default: 'file'
97           description: 'Dispatcher to use for Yardstick reporting'
98       - string:
99           name: DELETE_STACK
100           default: 'yes'
101           description: 'Delete the stack upon completion of the build'
102
103     properties:
104       - logrotate
105       - build-blocker:
106           use-build-blocker: true
107           blocking-jobs:
108             - 'engine-verify-packaging-ubuntu1804.*'
109             - 'engine-verify-online-ubuntu1804.*'
110             - 'engine-verify-online-ubuntu1804.*'
111           block-level: 'NODE'
112       - throttle:
113           max-per-node: 1
114           max-total: 3
115           option: project
116
117     wrappers:
118       - build-timeout:
119           timeout: 180
120       - credentials-binding:
121           - file:
122               credential-id: '{openrc-credentials-file}'
123               variable: OPENRC_FILE
124           - username-password-separated:
125               credential-id: 'nordix-cicd-arm-credentials'
126               username: NORDIX_ARM_USERNAME
127               password: NORDIX_ARM_TOKEN
128       - mask-passwords
129       - fix-workspace-permissions
130       - openstack:
131           single-use: True
132
133     scm:
134       - git-scm-gerrit:
135           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
136           branch: '{branch}'
137           refspec: $GERRIT_REFSPEC
138           wipe_workspace: true
139           clean_before: false
140
141     builders:
142       - shell: |
143           #!/bin/bash
144           cp $OPENRC_FILE /tmp/openrc
145       - multijob:
146           name: Offline Deployment on {type} instances
147           condition: SUCCESSFUL
148           execution-type: PARALLEL
149           projects:
150             - name: 'engine-verify-online-deploy-{distro}-city-{type}-master'
151               current-parameters: true
152               node-parameters: true
153               kill-phase-on: FAILURE
154               abort-all-job: true
155       - multijob:
156           name: Offline Testing on {type} instances
157           condition: SUCCESSFUL
158           execution-type: PARALLEL
159           projects:
160             - name: 'engine-verify-online-test-{distro}-city-{type}-master'
161               current-parameters: true
162               node-parameters: true
163               kill-phase-on: FAILURE
164               abort-all-job: true
165
166 - job-template:
167     name: 'engine-verify-online-{phase}-{distro}-{cloud}-{type}-{stream}'
168
169     disabled: '{obj:disabled}'
170
171     concurrent: true
172
173     properties:
174       - logrotate
175       - build-blocker:
176           use-build-blocker: true
177           blocking-jobs:
178             - 'engine-verify-packaging-ubuntu1804.*'
179             - 'engine-verify-online-ubuntu1804.*'
180             - 'engine-verify-offline-ubuntu1804.*'
181           block-level: 'NODE'
182       - throttle:
183           max-per-node: 1
184           max-total: 3
185           option: project
186
187     wrappers:
188       - build-timeout:
189           timeout: 180
190       - credentials-binding:
191           - file:
192               credential-id: '{openrc-credentials-file}'
193               variable: OPENRC_FILE
194           - username-password-separated:
195               credential-id: 'nordix-cicd-arm-credentials'
196               username: NORDIX_ARM_USERNAME
197               password: NORDIX_ARM_TOKEN
198       - mask-passwords
199       - fix-workspace-permissions
200       - openstack:
201           single-use: True
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:
212       - shell: |
213           #!/bin/bash
214           cp $OPENRC_FILE /tmp/openrc
215           env