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-{phase}-{type}-{stream}'
50 #--------------------------------
52 #--------------------------------
54 name: 'xci-verify-{distro}-{type}-{stream}'
56 project-type: freestyle
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'
147 - description-setter:
148 description: "Built on $NODE_NAME"
150 - project: 'xci-verify-deploy-{type}-{stream}'
151 current-parameters: false
152 predefined-parameters: |
155 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
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
164 - project: 'xci-verify-healthcheck-{type}-{stream}'
165 current-parameters: false
166 predefined-parameters: |
169 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
170 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
172 FUNCTEST_TIER=healthcheck
173 GERRIT_BRANCH=$GERRIT_BRANCH
174 GERRIT_REFSPEC=$GERRIT_REFSPEC
175 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
176 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
182 name: 'xci-verify-{phase}-{type}-{stream}'
191 use-build-blocker: true
193 - 'bifrost-verify-.*'
194 - 'bifrost-periodic-.*'
202 default: 'releng-xci'
207 name: DEPLOY_SCENARIO
208 default: 'os-nosdn-nofeature-noha'
213 name: FUNCTEST_SUITE_NAME
214 default: 'healthcheck'
219 name: CLEAN_DIB_IMAGES
222 name: OPNFV_RELENG_DEV_PATH
229 default: https://gerrit.opnfv.org/gerrit/$PROJECT
230 description: 'Git URL to use on this Jenkins Slave'
236 - fix-workspace-permissions
242 - description-setter:
243 description: "Built on $NODE_NAME for $DISTRO"
244 - 'xci-verify-{phase}-macro'
246 #--------------------------------
248 #--------------------------------
250 name: 'xci-verify-deploy-macro'
255 # skip the deployment if the patch doesn't impact the deployment
256 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
257 echo "Skipping the deployment!"
263 # The start-new-vm.sh script will copy the entire releng-xci directory
264 # so lets prepare the test script now so it can be copied by the script.
265 # Please do not move it elsewhere or you would have to move it to the VM
267 cat > xci_test.sh<<EOF
269 export DISTRO=$DISTRO
270 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
271 export FUNCTEST_MODE=$FUNCTEST_MODE
272 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
273 export XCI_FLAVOR=$XCI_FLAVOR
274 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
275 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
276 export INSTALLER_TYPE=$INSTALLER_TYPE
277 export GIT_BASE=$GIT_BASE
278 export JENKINS_HOME=$JENKINS_HOME
283 chmod a+x xci_test.sh
285 ./xci/scripts/vm/start-new-vm.sh $DISTRO
289 # skip the deployment if the patch doesn't impact the deployment
290 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
291 echo "Skipping the deployment!"
295 ssh ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
299 name: 'xci-verify-healthcheck-macro'
304 # skip the healthcheck if the patch doesn't impact the deployment
305 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
306 echo "Skipping the healthcheck!"
314 # skip the deployment if the patch doesn't impact the deployment
315 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
316 echo "Skipping the deployment!"
320 sudo virsh destroy ${DISTRO}_xci_vm
321 sudo virsh undefine ${DISTRO}_xci_vm
323 # this will be enabled once the xci is prepared
325 # name: 'xci-verify-healthcheck-macro'
328 # !include-raw: ../../utils/fetch_os_creds.sh
330 # !include-raw: ../functest/functest-alpine.sh