From aa33ff0331781c277743ab6a1a5260a2b8ad4497 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Fri, 24 Aug 2018 12:29:52 +0200 Subject: [PATCH] xci: Adjust build blockers and fix functest preparation 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 --- jjb/xci/xci-daily-jobs.yaml | 32 +++++++++++++++++++++++--------- jjb/xci/xci-merge-jobs.yaml | 1 + 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/jjb/xci/xci-daily-jobs.yaml b/jjb/xci/xci-daily-jobs.yaml index d7e18efb6..28c5aebb2 100644 --- a/jjb/xci/xci-daily-jobs.yaml +++ b/jjb/xci/xci-daily-jobs.yaml @@ -77,6 +77,7 @@ use-build-blocker: true blocking-jobs: - '^xci-verify.*' + - '^xci-merge.*' - '^xci-os.*' - '^xci-deploy.*' - '^xci-functest.*' @@ -173,6 +174,7 @@ use-build-blocker: true blocking-jobs: - '^xci-verify.*' + - '^xci-merge.*' - '^xci-deploy.*' - '^xci-functest.*' - '^bifrost-.*periodic.*' @@ -233,6 +235,17 @@ # -------------------------- # 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: @@ -243,14 +256,6 @@ 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 @@ -259,9 +264,18 @@ 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" diff --git a/jjb/xci/xci-merge-jobs.yaml b/jjb/xci/xci-merge-jobs.yaml index cb438ad5d..bdb6d5617 100644 --- a/jjb/xci/xci-merge-jobs.yaml +++ b/jjb/xci/xci-merge-jobs.yaml @@ -223,6 +223,7 @@ blocking-jobs: - 'xci-verify-{distro}-.*' - 'xci-merge-{distro}-.*' + - 'xci-os.*' - 'openstack-bifrost-verify-{distro}-.*' - 'xci-osa-verify-{distro}-.*' - 'xci-osa-periodic-{distro}-.*' -- 2.16.6