2 name: 'opnfv-xci-verify'
5 #--------------------------------
7 #--------------------------------
11 #--------------------------------
13 #--------------------------------
24 #--------------------------------
26 #--------------------------------
29 #--------------------------------
30 # patch verification phases
31 #--------------------------------
35 #--------------------------------
37 #--------------------------------
39 - 'xci-verify-{distro}-{type}-{stream}'
40 - 'xci-verify-{phase}-{type}-{stream}'
41 #--------------------------------
43 #--------------------------------
45 name: 'xci-verify-{distro}-{type}-{stream}'
47 project-type: freestyle
49 disabled: '{obj:disabled}'
56 use-build-blocker: true
58 - 'xci-verify-{distro}-.*'
59 - 'bifrost-verify-{distro}-.*'
60 - 'bifrost-periodic-{distro}-.*'
61 - 'osa-verify-{distro}-.*'
62 - 'osa-periodic-{distro}-.*'
75 - fix-workspace-permissions
82 server-name: 'gerrit.opnfv.org'
84 - patchset-created-event:
85 exclude-drafts: 'false'
86 exclude-trivial-rebase: 'false'
87 exclude-no-code-change: 'true'
88 - draft-published-event
89 - comment-added-contains-event:
90 comment-contains-value: 'recheck'
91 - comment-added-contains-event:
92 comment-contains-value: 'reverify'
94 - project-compare-type: 'ANT'
95 project-pattern: '{project}'
97 - branch-compare-type: 'ANT'
98 branch-pattern: '**/{branch}'
99 disable-strict-forbidden-file-verification: 'true'
102 pattern: 'bifrost/**'
105 forbidden-file-paths:
107 pattern: 'prototypes/**'
109 pattern: 'upstream/**'
111 pattern: '**/README.rst'
114 readable-message: true
116 successful: {skip-vote}
118 unstable: {skip-vote}
119 notbuilt: {skip-vote}
127 default: 'xci-virtual'
129 name: CLEAN_DIB_IMAGES
133 default: https://gerrit.opnfv.org/gerrit/$PROJECT
134 description: 'Git URL to use on this Jenkins Slave'
138 - description-setter:
139 description: "Built on $NODE_NAME"
141 - project: 'xci-verify-deploy-{type}-{stream}'
142 current-parameters: false
143 predefined-parameters: |
146 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
147 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
148 GERRIT_BRANCH=$GERRIT_BRANCH
149 GERRIT_REFSPEC=$GERRIT_REFSPEC
150 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
151 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
155 - project: 'xci-verify-healthcheck-{type}-{stream}'
156 current-parameters: false
157 predefined-parameters: |
160 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
161 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
163 FUNCTEST_TIER=healthcheck
164 GERRIT_BRANCH=$GERRIT_BRANCH
165 GERRIT_REFSPEC=$GERRIT_REFSPEC
166 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
167 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
173 name: 'xci-verify-{phase}-{type}-{stream}'
182 use-build-blocker: true
184 - 'bifrost-verify-.*'
185 - 'bifrost-periodic-.*'
193 default: 'releng-xci'
198 name: DEPLOY_SCENARIO
199 default: 'os-nosdn-nofeature-noha'
204 name: FUNCTEST_SUITE_NAME
205 default: 'healthcheck'
210 name: CLEAN_DIB_IMAGES
213 name: OPNFV_RELENG_DEV_PATH
220 default: https://gerrit.opnfv.org/gerrit/$PROJECT
221 description: 'Git URL to use on this Jenkins Slave'
227 - fix-workspace-permissions
233 - description-setter:
234 description: "Built on $NODE_NAME for $DISTRO"
235 - 'xci-verify-{phase}-macro'
237 #--------------------------------
239 #--------------------------------
241 name: 'xci-verify-deploy-macro'
246 # skip the deployment if the patch doesn't impact the deployment
247 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
248 echo "Skipping the deployment!"
254 # The start-new-vm.sh script will copy the entire releng-xci directory
255 # so lets prepare the test script now so it can be copied by the script.
256 # Please do not move it elsewhere or you would have to move it to the VM
258 cat > xci_test.sh<<EOF
260 export DISTRO=$DISTRO
261 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
262 export FUNCTEST_MODE=$FUNCTEST_MODE
263 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
264 export XCI_FLAVOR=$XCI_FLAVOR
265 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
266 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
267 export INSTALLER_TYPE=$INSTALLER_TYPE
268 export GIT_BASE=$GIT_BASE
269 export JENKINS_HOME=$JENKINS_HOME
274 chmod a+x xci_test.sh
276 ./xci/scripts/vm/start-new-vm.sh $DISTRO
280 # skip the deployment if the patch doesn't impact the deployment
281 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
282 echo "Skipping the deployment!"
286 ssh ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
290 name: 'xci-verify-healthcheck-macro'
295 # skip the healthcheck if the patch doesn't impact the deployment
296 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
297 echo "Skipping the healthcheck!"
305 # skip the deployment if the patch doesn't impact the deployment
306 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
307 echo "Skipping the deployment!"
311 sudo virsh destroy ${DISTRO}_xci_vm
312 sudo virsh undefine ${DISTRO}_xci_vm
314 # this will be enabled once the xci is prepared
316 # name: 'xci-verify-healthcheck-macro'
319 # !include-raw: ../../utils/fetch_os_creds.sh
321 # !include-raw: ../functest/functest-alpine.sh