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: |
145 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
146 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
147 GERRIT_BRANCH=$GERRIT_BRANCH
148 GERRIT_REFSPEC=$GERRIT_REFSPEC
149 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
150 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
154 - project: 'xci-verify-healthcheck-{type}-{stream}'
155 current-parameters: false
156 predefined-parameters: |
158 DEPLOY_SCENARIO=os-nosdn-nofeature-noha
159 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
161 FUNCTEST_TIER=healthcheck
162 GERRIT_BRANCH=$GERRIT_BRANCH
163 GERRIT_REFSPEC=$GERRIT_REFSPEC
164 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
165 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
171 name: 'xci-verify-{phase}-{type}-{stream}'
180 use-build-blocker: true
182 - 'xci-verify-deploy-.*'
183 - 'xci-verify-healthcheck-.*'
184 - 'bifrost-verify-.*'
185 - 'bifrost-periodic-.*'
195 name: DEPLOY_SCENARIO
196 default: 'os-nosdn-nofeature-noha'
201 name: FUNCTEST_SUITE_NAME
202 default: 'healthcheck'
207 name: CLEAN_DIB_IMAGES
210 name: OPNFV_RELENG_DEV_PATH
217 default: https://gerrit.opnfv.org/gerrit/$PROJECT
218 description: 'Git URL to use on this Jenkins Slave'
224 - fix-workspace-permissions
230 - description-setter:
231 description: "Built on $NODE_NAME for $DISTRO"
232 - 'xci-verify-{phase}-macro'
234 #--------------------------------
236 #--------------------------------
238 name: 'xci-verify-deploy-macro'
243 # skip the deployment if the patch doesn't impact the deployment
244 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
245 echo "Skipping the deployment!"
251 # The start-new-vm.sh script will copy the entire releng-xci directory
252 # so lets prepare the test script now so it can be copied by the script.
253 # Please do not move it elsewhere or you would have to move it to the VM
255 cat > xci_test.sh<<EOF
257 export DISTRO=$DISTRO
258 export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
259 export FUNCTEST_MODE=$FUNCTEST_MODE
260 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
261 export XCI_FLAVOR=$XCI_FLAVOR
262 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
263 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
264 export INSTALLER_TYPE=$INSTALLER_TYPE
265 export GIT_BASE=$GIT_BASE
266 export JENKINS_HOME=$JENKINS_HOME
271 chmod a+x xci_test.sh
273 ./xci/scripts/vm/start-new-vm.sh $DISTRO
277 # skip the deployment if the patch doesn't impact the deployment
278 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
279 echo "Skipping the deployment!"
283 ssh ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
287 name: 'xci-verify-healthcheck-macro'
292 # skip the healthcheck if the patch doesn't impact the deployment
293 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
294 echo "Skipping the healthcheck!"
302 # skip the deployment if the patch doesn't impact the deployment
303 if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
304 echo "Skipping the deployment!"
308 sudo virsh destroy ${DISTRO}_xci_vm
309 sudo virsh undefine ${DISTRO}_xci_vm
311 # this will be enabled once the xci is prepared
313 # name: 'xci-verify-healthcheck-macro'
316 # !include-raw: ../../utils/fetch_os_creds.sh
318 # !include-raw: ../functest/functest-alpine.sh