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'
110 forbidden-file-paths:
112 pattern: 'prototypes/**'
114 pattern: 'upstream/**'
116 pattern: '**/README.rst'
120 pattern: 'xci/scripts/vm/**'
121 readable-message: true
122 custom-url: '* $JOB_NAME $BUILD_URL'
124 successful: '{obj:successful}'
125 failed: '{obj:failed}'
126 unstable: '{obj:unstable}'
127 notbuilt: '{obj:notbuilt}'
135 default: 'xci-virtual'
137 name: CLEAN_DIB_IMAGES
141 default: https://gerrit.opnfv.org/gerrit/$PROJECT
142 description: 'Git URL to use on this Jenkins Slave'
145 - description-setter:
146 description: "Built on $NODE_NAME"
149 condition: SUCCESSFUL
151 - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
152 current-parameters: true
153 predefined-parameters: |
155 DEPLOY_SCENARIO=os-nosdn-nofeature
156 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
157 GERRIT_BRANCH=$GERRIT_BRANCH
158 GERRIT_REFSPEC=$GERRIT_REFSPEC
159 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
160 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
161 node-parameters: true
162 kill-phase-on: FAILURE
166 condition: SUCCESSFUL
168 - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
169 current-parameters: true
170 predefined-parameters: |
172 DEPLOY_SCENARIO=os-nosdn-nofeature
173 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
175 FUNCTEST_TIER=healthcheck
176 GERRIT_BRANCH=$GERRIT_BRANCH
177 GERRIT_REFSPEC=$GERRIT_REFSPEC
178 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
179 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
180 node-parameters: true
185 name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
194 use-build-blocker: true
196 - '.*-bifrost-verify-.*'
197 - '.*-bifrost-periodic-.*'
205 default: 'releng-xci'
210 name: DEPLOY_SCENARIO
211 default: 'os-nosdn-nofeature'
216 name: FUNCTEST_SUITE_NAME
217 default: 'healthcheck'
222 name: CLEAN_DIB_IMAGES
225 name: OPNFV_RELENG_DEV_PATH
232 default: https://gerrit.opnfv.org/gerrit/$PROJECT
233 description: 'Git URL to use on this Jenkins Slave'
239 - fix-workspace-permissions
245 - description-setter:
246 description: "Built on $NODE_NAME"
247 - 'xci-verify-{phase}-macro'
249 # -------------------------------
251 # -------------------------------
253 name: 'xci-verify-deploy-macro'
258 # skip the deployment if the patch doesn't impact the deployment
259 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
260 echo "Skipping the deployment!"
266 # The start-new-vm.sh script will copy the entire releng-xci directory
267 # so lets prepare the test script now so it can be copied by the script.
268 # Please do not move it elsewhere or you would have to move it to the VM
270 cat > xci_test.sh<<EOF
272 export DISTRO=$DISTRO
273 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
274 export FUNCTEST_MODE=$FUNCTEST_MODE
275 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
276 export XCI_FLAVOR=$XCI_FLAVOR
277 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
278 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
279 export INSTALLER_TYPE=$INSTALLER_TYPE
280 export GIT_BASE=$GIT_BASE
281 export JENKINS_HOME=$JENKINS_HOME
286 chmod a+x xci_test.sh
288 export XCI_BUILD_CLEAN_VM_OS=false
289 export XCI_UPDATE_CLEAN_VM_OS=true
291 ./xci/scripts/vm/start-new-vm.sh $DISTRO
295 # skip the deployment if the patch doesn't impact the deployment
296 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
297 echo "Skipping the deployment!"
301 ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
305 name: 'xci-verify-healthcheck-macro'
310 # skip the healthcheck if the patch doesn't impact the deployment
311 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
312 echo "Skipping the healthcheck!"
320 # skip the deployment if the patch doesn't impact the deployment
321 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
322 echo "Skipping the deployment!"
326 sudo virsh destroy ${DISTRO}_xci_vm
327 sudo virsh undefine ${DISTRO}_xci_vm
329 # this will be enabled once the xci is prepared
331 # name: 'xci-verify-healthcheck-macro'
334 # !include-raw: ../../utils/fetch_os_creds.sh
336 # !include-raw: ../functest/functest-alpine.sh