3 name: 'opnfv-xci-verify'
6 # -------------------------------
8 # -------------------------------
12 # -------------------------------
14 # -------------------------------
34 # -------------------------------
36 # -------------------------------
39 # -------------------------------
40 # patch verification phases
41 # -------------------------------
45 # -------------------------------
47 # -------------------------------
49 - 'xci-verify-{distro}-{type}-{stream}'
50 - 'xci-verify-{distro}-{phase}-{type}-{stream}'
51 # -------------------------------
53 # -------------------------------
55 name: 'xci-verify-{distro}-{type}-{stream}'
57 project-type: multijob
59 disabled: '{obj:disabled}'
66 use-build-blocker: true
68 - 'xci-verify-{distro}-.*'
69 - 'bifrost-verify-{distro}-.*'
70 - 'bifrost-periodic-{distro}-.*'
71 - 'osa-verify-{distro}-.*'
72 - 'osa-periodic-{distro}-.*'
85 - fix-workspace-permissions
92 server-name: 'gerrit.opnfv.org'
94 - patchset-created-event:
95 exclude-drafts: 'false'
96 exclude-trivial-rebase: 'false'
97 exclude-no-code-change: 'true'
98 - draft-published-event
99 - comment-added-contains-event:
100 comment-contains-value: 'recheck'
101 - comment-added-contains-event:
102 comment-contains-value: 'reverify'
104 - project-compare-type: 'ANT'
105 project-pattern: '{project}'
107 - branch-compare-type: 'ANT'
108 branch-pattern: '**/{branch}'
109 disable-strict-forbidden-file-verification: 'true'
112 pattern: 'bifrost/**'
115 forbidden-file-paths:
117 pattern: 'prototypes/**'
119 pattern: 'upstream/**'
121 pattern: '**/README.rst'
124 readable-message: true
125 custom-url: '* $JOB_NAME $BUILD_URL'
127 successful: '{obj:successful}'
128 failed: '{obj:failed}'
129 unstable: '{obj:unstable}'
130 notbuilt: '{obj:notbuilt}'
138 default: 'xci-virtual'
140 name: CLEAN_DIB_IMAGES
144 default: https://gerrit.opnfv.org/gerrit/$PROJECT
145 description: 'Git URL to use on this Jenkins Slave'
148 - description-setter:
149 description: "Built on $NODE_NAME"
152 condition: SUCCESSFUL
154 - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
155 current-parameters: true
156 predefined-parameters: |
158 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
159 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
160 GERRIT_BRANCH=$GERRIT_BRANCH
161 GERRIT_REFSPEC=$GERRIT_REFSPEC
162 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
163 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
164 node-parameters: true
165 kill-phase-on: FAILURE
169 condition: SUCCESSFUL
171 - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
172 current-parameters: true
173 predefined-parameters: |
175 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
176 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
178 FUNCTEST_TIER=healthcheck
179 GERRIT_BRANCH=$GERRIT_BRANCH
180 GERRIT_REFSPEC=$GERRIT_REFSPEC
181 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
182 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
183 node-parameters: true
188 name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
197 use-build-blocker: true
199 - '.*-bifrost-verify-.*'
200 - '.*-bifrost-periodic-.*'
208 default: 'releng-xci'
213 name: DEPLOY_SCENARIO
214 default: 'os-nosdn-nofeature-noha'
219 name: FUNCTEST_SUITE_NAME
220 default: 'healthcheck'
225 name: CLEAN_DIB_IMAGES
228 name: OPNFV_RELENG_DEV_PATH
235 default: https://gerrit.opnfv.org/gerrit/$PROJECT
236 description: 'Git URL to use on this Jenkins Slave'
242 - fix-workspace-permissions
248 - description-setter:
249 description: "Built on $NODE_NAME"
250 - 'xci-verify-{phase}-macro'
252 # -------------------------------
254 # -------------------------------
256 name: 'xci-verify-deploy-macro'
261 # skip the deployment if the patch doesn't impact the deployment
262 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
263 echo "Skipping the deployment!"
269 # The start-new-vm.sh script will copy the entire releng-xci directory
270 # so lets prepare the test script now so it can be copied by the script.
271 # Please do not move it elsewhere or you would have to move it to the VM
273 cat > xci_test.sh<<EOF
275 export DISTRO=$DISTRO
276 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
277 export FUNCTEST_MODE=$FUNCTEST_MODE
278 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
279 export XCI_FLAVOR=$XCI_FLAVOR
280 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
281 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
282 export INSTALLER_TYPE=$INSTALLER_TYPE
283 export GIT_BASE=$GIT_BASE
284 export JENKINS_HOME=$JENKINS_HOME
289 chmod a+x xci_test.sh
291 export XCI_BUILD_CLEAN_VM_OS=false
292 export XCI_UPDATE_CLEAN_VM_OS=true
294 ./xci/scripts/vm/start-new-vm.sh $DISTRO
298 # skip the deployment if the patch doesn't impact the deployment
299 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
300 echo "Skipping the deployment!"
304 ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
308 name: 'xci-verify-healthcheck-macro'
313 # skip the healthcheck if the patch doesn't impact the deployment
314 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
315 echo "Skipping the healthcheck!"
323 # skip the deployment if the patch doesn't impact the deployment
324 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
325 echo "Skipping the deployment!"
329 sudo virsh destroy ${DISTRO}_xci_vm
330 sudo virsh undefine ${DISTRO}_xci_vm
332 # this will be enabled once the xci is prepared
334 # name: 'xci-verify-healthcheck-macro'
337 # !include-raw: ../../utils/fetch_os_creds.sh
339 # !include-raw: ../functest/functest-alpine.sh