xci: Adjust build blockers and fix functest preparation 31/61331/4
authorFatih Degirmenci <fdegir@gmail.com>
Fri, 24 Aug 2018 10:29:52 +0000 (12:29 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Fri, 24 Aug 2018 12:05:34 +0000 (14:05 +0200)
Functest preparation is moved into the deployment job to ensure
things are prepared before we are done and functest job gets
triggered. Making the preparation in functest job will cause
us to either reinitialize venv or depend on deployment job directory.
Apart from that, the env vars necessary for functest are available
within deployment job anyways so reusing that will make running
functest simpler.

See the comments in xci-daily-jobs.yaml builder macros.

Change-Id: I4c5bbe5f4b31bb620986d75ba78de6c0fe442975
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
jjb/xci/xci-daily-jobs.yaml
jjb/xci/xci-merge-jobs.yaml

index d7e18ef..28c5aeb 100644 (file)
@@ -77,6 +77,7 @@
           use-build-blocker: true
           blocking-jobs:
             - '^xci-verify.*'
+            - '^xci-merge.*'
             - '^xci-os.*'
             - '^xci-deploy.*'
             - '^xci-functest.*'
           use-build-blocker: true
           blocking-jobs:
             - '^xci-verify.*'
+            - '^xci-merge.*'
             - '^xci-deploy.*'
             - '^xci-functest.*'
             - '^bifrost-.*periodic.*'
 # --------------------------
 # builder macros
 # --------------------------
+# These need to be properly fixed once the basic deployment and functest
+# jobs are working outside of clean vm.
+# One of the ugly fixes is moving functest preparation step into the
+# deployment job itself since functest preparation requires some of the
+# things from deployment job. With clean VM, this wasn't an issue
+# since everything was on clean VM. When we move things out of clean
+# VM, things are done in workspaces of the jobs that are different.
+#
+# Apart from these things, we will need to go through the scripts
+# used for verify jobs and make them updated in order to be able to
+# use them for jobs that don't use clean VM.
 - builder:
     name: 'xci-daily-deploy-macro'
     builders:
 
           cd $WORKSPACE/xci && ./xci-deploy.sh
 
-- builder:
-    name: 'xci-daily-functest-macro'
-    builders:
-      - shell: |
-          #!/bin/bash
-          set -o errexit
-          set -o pipefail
-
           echo "Prepare OPNFV VM for Functest"
           echo "---------------------------------------------------------------------------------"
           export XCI_PATH=$WORKSPACE
           while read var; do
               declare -x "\${var}" 2>/dev/null
               echo $var
-          done < ${XCI_PATH}/.cache/xci.env && cd $XCI_PATH/xci && \
+          done < ${XCI_PATH}/.cache/xci.env && cd ${XCI_PATH}/xci && \
           ansible-playbook -i playbooks/dynamic_inventory.py playbooks/prepare-functest.yml
 
           echo "Run Functest"
           echo "---------------------------------------------------------------------------------"
+
+- builder:
+    name: 'xci-daily-functest-macro'
+    builders:
+      - shell: |
+          #!/bin/bash
+          set -o errexit
+          set -o pipefail
+
           ssh root@192.168.122.2 "/root/run-functest.sh"
index cb438ad..bdb6d56 100644 (file)
           blocking-jobs:
             - 'xci-verify-{distro}-.*'
             - 'xci-merge-{distro}-.*'
+            - 'xci-os.*'
             - 'openstack-bifrost-verify-{distro}-.*'
             - 'xci-osa-verify-{distro}-.*'
             - 'xci-osa-periodic-{distro}-.*'