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
126 successful: '{obj:successful}'
127 failed: '{obj:failed}'
128 unstable: '{obj:unstable}'
129 notbuilt: '{obj:notbuilt}'
137 default: 'xci-virtual'
139 name: CLEAN_DIB_IMAGES
143 default: https://gerrit.opnfv.org/gerrit/$PROJECT
144 description: 'Git URL to use on this Jenkins Slave'
147 - description-setter:
148 description: "Built on $NODE_NAME"
151 condition: SUCCESSFUL
153 - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
154 current-parameters: true
155 predefined-parameters: |
157 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
158 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
159 GERRIT_BRANCH=$GERRIT_BRANCH
160 GERRIT_REFSPEC=$GERRIT_REFSPEC
161 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
162 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
163 node-parameters: true
164 kill-phase-on: FAILURE
168 condition: SUCCESSFUL
170 - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
171 current-parameters: true
172 predefined-parameters: |
174 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
175 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
177 FUNCTEST_TIER=healthcheck
178 GERRIT_BRANCH=$GERRIT_BRANCH
179 GERRIT_REFSPEC=$GERRIT_REFSPEC
180 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
181 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
182 node-parameters: true
187 name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
196 use-build-blocker: true
198 - 'bifrost-verify-.*'
199 - 'bifrost-periodic-.*'
207 default: 'releng-xci'
212 name: DEPLOY_SCENARIO
213 default: 'os-nosdn-nofeature-noha'
218 name: FUNCTEST_SUITE_NAME
219 default: 'healthcheck'
224 name: CLEAN_DIB_IMAGES
227 name: OPNFV_RELENG_DEV_PATH
234 default: https://gerrit.opnfv.org/gerrit/$PROJECT
235 description: 'Git URL to use on this Jenkins Slave'
241 - fix-workspace-permissions
247 - description-setter:
248 description: "Built on $NODE_NAME"
249 - 'xci-verify-{phase}-macro'
251 # -------------------------------
253 # -------------------------------
255 name: 'xci-verify-deploy-macro'
260 # skip the deployment if the patch doesn't impact the deployment
261 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
262 echo "Skipping the deployment!"
268 # The start-new-vm.sh script will copy the entire releng-xci directory
269 # so lets prepare the test script now so it can be copied by the script.
270 # Please do not move it elsewhere or you would have to move it to the VM
272 cat > xci_test.sh<<EOF
274 export DISTRO=$DISTRO
275 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
276 export FUNCTEST_MODE=$FUNCTEST_MODE
277 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
278 export XCI_FLAVOR=$XCI_FLAVOR
279 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
280 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
281 export INSTALLER_TYPE=$INSTALLER_TYPE
282 export GIT_BASE=$GIT_BASE
283 export JENKINS_HOME=$JENKINS_HOME
288 chmod a+x xci_test.sh
290 export XCI_BUILD_CLEAN_VM_OS=false
291 export XCI_UPDATE_CLEAN_VM_OS=true
293 ./xci/scripts/vm/start-new-vm.sh $DISTRO
297 # skip the deployment if the patch doesn't impact the deployment
298 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
299 echo "Skipping the deployment!"
303 ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
307 name: 'xci-verify-healthcheck-macro'
312 # skip the healthcheck if the patch doesn't impact the deployment
313 if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
314 echo "Skipping the healthcheck!"
322 # skip the deployment if the patch doesn't impact the deployment
323 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
324 echo "Skipping the deployment!"
328 sudo virsh destroy ${DISTRO}_xci_vm
329 sudo virsh undefine ${DISTRO}_xci_vm
331 # this will be enabled once the xci is prepared
333 # name: 'xci-verify-healthcheck-macro'
336 # !include-raw: ../../utils/fetch_os_creds.sh
338 # !include-raw: ../functest/functest-alpine.sh