2 name: 'opnfv-xci-verify'
5 #--------------------------------
7 #--------------------------------
11 #--------------------------------
13 #--------------------------------
33 #--------------------------------
35 #--------------------------------
38 #--------------------------------
39 # patch verification phases
40 #--------------------------------
44 #--------------------------------
46 #--------------------------------
48 - 'xci-verify-{distro}-{type}-{stream}'
49 - 'xci-verify-{distro}-{phase}-{type}-{stream}'
50 #--------------------------------
52 #--------------------------------
54 name: 'xci-verify-{distro}-{type}-{stream}'
56 project-type: multijob
58 disabled: '{obj:disabled}'
65 use-build-blocker: true
67 - 'xci-verify-{distro}-.*'
68 - 'bifrost-verify-{distro}-.*'
69 - 'bifrost-periodic-{distro}-.*'
70 - 'osa-verify-{distro}-.*'
71 - 'osa-periodic-{distro}-.*'
84 - fix-workspace-permissions
91 server-name: 'gerrit.opnfv.org'
93 - patchset-created-event:
94 exclude-drafts: 'false'
95 exclude-trivial-rebase: 'false'
96 exclude-no-code-change: 'true'
97 - draft-published-event
98 - comment-added-contains-event:
99 comment-contains-value: 'recheck'
100 - comment-added-contains-event:
101 comment-contains-value: 'reverify'
103 - project-compare-type: 'ANT'
104 project-pattern: '{project}'
106 - branch-compare-type: 'ANT'
107 branch-pattern: '**/{branch}'
108 disable-strict-forbidden-file-verification: 'true'
111 pattern: 'bifrost/**'
114 forbidden-file-paths:
116 pattern: 'prototypes/**'
118 pattern: 'upstream/**'
120 pattern: '**/README.rst'
123 readable-message: true
125 successful: '{obj:successful}'
126 failed: '{obj:failed}'
127 unstable: '{obj:unstable}'
128 notbuilt: '{obj:notbuilt}'
136 default: 'xci-virtual'
138 name: CLEAN_DIB_IMAGES
142 default: https://gerrit.opnfv.org/gerrit/$PROJECT
143 description: 'Git URL to use on this Jenkins Slave'
146 - description-setter:
147 description: "Built on $NODE_NAME"
150 condition: SUCCESSFUL
152 - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
153 current-parameters: true
154 predefined-parameters: |
156 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
157 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
158 GERRIT_BRANCH=$GERRIT_BRANCH
159 GERRIT_REFSPEC=$GERRIT_REFSPEC
160 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
161 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
162 node-parameters: true
163 kill-phase-on: FAILURE
167 condition: SUCCESSFUL
169 - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
170 current-parameters: true
171 predefined-parameters: |
173 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
174 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
176 FUNCTEST_TIER=healthcheck
177 GERRIT_BRANCH=$GERRIT_BRANCH
178 GERRIT_REFSPEC=$GERRIT_REFSPEC
179 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
180 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
181 node-parameters: true
186 name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
195 use-build-blocker: true
197 - 'bifrost-verify-.*'
198 - 'bifrost-periodic-.*'
206 default: 'releng-xci'
211 name: DEPLOY_SCENARIO
212 default: 'os-nosdn-nofeature-noha'
217 name: FUNCTEST_SUITE_NAME
218 default: 'healthcheck'
223 name: CLEAN_DIB_IMAGES
226 name: OPNFV_RELENG_DEV_PATH
233 default: https://gerrit.opnfv.org/gerrit/$PROJECT
234 description: 'Git URL to use on this Jenkins Slave'
240 - fix-workspace-permissions
246 - description-setter:
247 description: "Built on $NODE_NAME"
248 - 'xci-verify-{phase}-macro'
250 #--------------------------------
252 #--------------------------------
254 name: 'xci-verify-deploy-macro'
259 # skip the deployment if the patch doesn't impact the deployment
260 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
261 echo "Skipping the deployment!"
267 # The start-new-vm.sh script will copy the entire releng-xci directory
268 # so lets prepare the test script now so it can be copied by the script.
269 # Please do not move it elsewhere or you would have to move it to the VM
271 cat > xci_test.sh<<EOF
273 export DISTRO=$DISTRO
274 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
275 export FUNCTEST_MODE=$FUNCTEST_MODE
276 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
277 export XCI_FLAVOR=$XCI_FLAVOR
278 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
279 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
280 export INSTALLER_TYPE=$INSTALLER_TYPE
281 export GIT_BASE=$GIT_BASE
282 export JENKINS_HOME=$JENKINS_HOME
287 chmod a+x xci_test.sh
289 ./xci/scripts/vm/start-new-vm.sh $DISTRO
293 # skip the deployment if the patch doesn't impact the deployment
294 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
295 echo "Skipping the deployment!"
299 ssh ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
303 name: 'xci-verify-healthcheck-macro'
308 # skip the healthcheck if the patch doesn't impact the deployment
309 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
310 echo "Skipping the healthcheck!"
318 # skip the deployment if the patch doesn't impact the deployment
319 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
320 echo "Skipping the deployment!"
324 sudo virsh destroy ${DISTRO}_xci_vm
325 sudo virsh undefine ${DISTRO}_xci_vm
327 # this will be enabled once the xci is prepared
329 # name: 'xci-verify-healthcheck-macro'
332 # !include-raw: ../../utils/fetch_os_creds.sh
334 # !include-raw: ../functest/functest-alpine.sh