7 # -------------------------------
9 # -------------------------------
12 opnfv-releng-version: master
15 # -------------------------------
17 # -------------------------------
19 - 'os-nosdn-nofeature-noha':
20 deploy-scenario: 'os-nosdn-nofeature'
23 - 'k8-calico-nofeature-noha':
24 deploy-scenario: 'k8-calico-nofeature'
25 installer-type: 'kubespray'
28 # -------------------------------
30 # -------------------------------
35 # -------------------------------
37 # -------------------------------
41 slave-label: xci-baremetal
44 slave-label: xci-baremetal
47 slave-label: xci-baremetal
49 # -------------------------------
51 # -------------------------------
57 # -------------------------------
59 # -------------------------------
61 - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
62 - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
64 # -------------------------------
66 # -------------------------------
68 name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
70 disabled: '{obj:disabled}'
76 use-build-blocker: true
84 - '^bifrost-.*periodic.*'
86 blocking-level: 'NODE'
95 default: '{deploy-scenario}'
98 default: '{installer-type}'
101 default: '{xci-flavor}'
104 default: '{slave-label}'
106 node-eligibility: 'ignore-offline'
111 name: FUNCTEST_VERSION
117 name: FUNCTEST_SUITE_NAME
124 default: https://gerrit.opnfv.org/gerrit/$PROJECT
125 description: 'Git URL to use on this Jenkins Slave'
131 - fix-workspace-permissions
134 - description-setter:
135 description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
137 - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
138 current-parameters: false
139 predefined-parameters: |
140 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
141 INSTALLER_TYPE=$INSTALLER_TYPE
142 XCI_FLAVOR=$XCI_FLAVOR
144 XCI_DISTRO=$XCI_DISTRO
145 FUNCTEST_VERSION=$FUNCTEST_VERSION
146 FUNCTEST_MODE=$FUNCTEST_MODE
147 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
151 - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
152 current-parameters: false
153 predefined-parameters: |
154 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
155 INSTALLER_TYPE=$INSTALLER_TYPE
156 XCI_FLAVOR=$XCI_FLAVOR
158 XCI_DISTRO=$XCI_DISTRO
159 FUNCTEST_VERSION=$FUNCTEST_VERSION
160 FUNCTEST_MODE=$FUNCTEST_MODE
161 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
165 build-step-failure-threshold: 'never'
166 failure-threshold: 'never'
167 unstable-threshold: 'FAILURE'
169 - project: 'xci-yardstick-{pod}-{distro}-daily-{stream}'
170 current-parameters: false
171 predefined-parameters: |
172 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
173 INSTALLER_TYPE=$INSTALLER_TYPE
174 XCI_FLAVOR=$XCI_FLAVOR
176 XCI_DISTRO=$XCI_DISTRO
180 build-step-failure-threshold: 'never'
181 failure-threshold: 'never'
182 unstable-threshold: 'FAILURE'
185 # yamllint disable rule:line-length
186 # yamllint enable rule:line-length
187 - email-jenkins-admins-on-failure
190 name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
198 use-build-blocker: true
204 - '^bifrost-.*periodic.*'
205 - '^osa-.*periodic.*'
206 blocking-level: 'NODE'
217 - fix-workspace-permissions
225 branch: '{opnfv-releng-version}'
227 name: DEPLOY_SCENARIO
228 default: 'os-nosdn-nofeature-noha'
240 default: '{slave-label}'
242 node-eligibility: 'ignore-offline'
244 name: FUNCTEST_VERSION
250 name: FUNCTEST_SUITE_NAME
257 default: https://gerrit.opnfv.org/gerrit/$PROJECT
260 - description-setter:
261 description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
262 - 'xci-daily-{phase}-macro'
264 # --------------------------
266 # --------------------------
267 # These need to be properly fixed once the basic deployment, functest, and
268 # yardstick jobs are working outside of clean vm.
269 # One of the ugly fixes is moving test preparation step into the
270 # deployment job itself since test preparation requires some of the
271 # things from deployment job. With clean VM, this wasn't an issue
272 # since everything was on clean VM. When we move things out of clean
273 # VM, things are done in workspaces of the jobs that are different.
275 # Apart from these things, we will need to go through the scripts
276 # used for verify jobs and make them updated in order to be able to
277 # use them for jobs that don't use clean VM.
279 name: 'xci-daily-deploy-macro'
286 echo "Cleaning the leftovers from the earlier run"
287 echo "---------------------------------------------------------------------------------"
288 for vm in $(sudo virsh list --all --name | grep -v xci_vm); do
290 sudo virsh destroy $vm > /dev/null 2>&1 || true
291 sudo virsh undefine $vm > /dev/null 2>&1 || true
292 sudo killall -r vbmc > /dev/null 2>&1 || true
293 sudo rm -rf /root/.vbmc > /dev/null 2>&1 || true
295 echo "---------------------------------------------------------------------------------"
297 # select the right PDF/IDF
298 export PDF=$WORKSPACE/xci/var/${NODE_NAME}-pdf.yml
299 export IDF=$WORKSPACE/xci/var/${NODE_NAME}-idf.yml
300 if [[ "$NODE_NAME" =~ "virtual" ]]; then
301 export PDF=$WORKSPACE/xci/var/pdf.yml
302 export IDF=$WORKSPACE/xci/var/idf.yml
305 cd $WORKSPACE/xci && ./xci-deploy.sh -p $PDF -i $IDF
307 echo "Prepare OPNFV VM for Tests"
308 echo "---------------------------------------------------------------------------------"
309 export XCI_PATH=$WORKSPACE
310 export XCI_VENV=${XCI_PATH}/venv
311 source $XCI_VENV/bin/activate
313 declare -x "\${var}" 2>/dev/null
315 done < ${XCI_PATH}/.cache/xci.env && cd ${XCI_PATH}/xci && \
316 ansible-playbook -i playbooks/dynamic_inventory.py playbooks/prepare-tests.yml
317 ssh root@192.168.122.2 "/root/prepare-tests.sh"
318 echo "---------------------------------------------------------------------------------"
321 name: 'xci-daily-functest-macro'
327 ssh root@192.168.122.2 "/root/run-functest.sh"
330 case ${DEPLOY_SCENARIO[0]} in
332 FUNCTEST_LOG=/root/functest-results/functest.log
335 FUNCTEST_LOG=/root/functest-results/functest-kubernetes.log
338 echo "Unable to determine the installer. Exiting!"
344 echo "---------------------------------------------------------------------------------"
345 ssh root@192.168.122.2 "cat $FUNCTEST_LOG"
346 echo "---------------------------------------------------------------------------------"
347 exit ${functest_exit}
349 name: 'xci-daily-yardstick-macro'
356 ssh root@192.168.122.2 "/root/run-yardstick.sh"