Merge "Add GERRIT_REFSPEC to 'project-parameter' Macro"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Wed, 24 Jan 2018 09:51:48 +0000 (09:51 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 24 Jan 2018 09:51:48 +0000 (09:51 +0000)
12 files changed:
jjb/daisy4nfv/daisy4nfv-build-kolla-image.sh
jjb/global/slave-params.yml
jjb/pharos/pharos.yml
jjb/releng/opnfv-docker.sh
jjb/releng/opnfv-docker.yml
jjb/xci/xci-cleanup.sh [new file with mode: 0755]
jjb/xci/xci-merge-jobs.yml [new file with mode: 0644]
jjb/xci/xci-promote.sh [new file with mode: 0755]
jjb/xci/xci-run-functest.sh [new file with mode: 0755]
jjb/xci/xci-start-deployment.sh [new file with mode: 0755]
jjb/xci/xci-start-new-vm.sh [new file with mode: 0755]
jjb/xci/xci-verify-jobs.yml

index 9a1e2fc..0441ea1 100755 (executable)
@@ -14,35 +14,9 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
-importkey () {
-    # clone releng repository
-    echo "Cloning releng repository..."
-    [ -d releng ] && rm -rf releng
-    git clone https://gerrit.opnfv.org/gerrit/releng ./releng/ &> /dev/null
-    #this is where we import the siging key
-    if [ -f ./releng/utils/gpg_import_key.sh ]; then
-        source ./releng/utils/gpg_import_key.sh
-    fi
-}
-
 upload_image_to_opnfv () {
     image=$1
 
-    importkey
-    if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
-        echo "Signing Key avaliable"
-        SIGN_ARTIFACT="true"
-    fi
-
-    if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then
-        gpg2 -vvv --batch --yes --no-tty \
-            --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
-            --passphrase besteffort \
-            --detach-sig $image
-        gsutil cp $image.sig gs://$GS_URL/upstream/$image.sig
-        echo "Image signature upload complete!"
-    fi
-
     sha512sum -b $image > $image.sha512sum
     gsutil cp $image.sha512sum gs://$GS_URL/upstream/$image.sha512sum
 
index 5136e71..5c1c7df 100644 (file)
           default: /root/.ssh/id_rsa
           description: 'SSH key to use for Apex'
 
+- parameter:
+    name: 'lf-pod4-defaults'
+    parameters:
+      - node:
+          name: SLAVE_NAME
+          description: 'Slave name on Jenkins'
+          allowed-slaves:
+            - lf-pod4
+          default-slaves:
+            - lf-pod4
+      - string:
+          name: GIT_BASE
+          default: https://gerrit.opnfv.org/gerrit/$PROJECT
+          description: 'Git URL to use on this Jenkins Slave'
+      - string:
+          name: SSH_KEY
+          default: /root/.ssh/id_rsa
+          description: 'SSH key to use for Apex'
+
+- parameter:
+    name: 'lf-pod5-defaults'
+    parameters:
+      - node:
+          name: SLAVE_NAME
+          description: 'Slave name on Jenkins'
+          allowed-slaves:
+            - lf-pod5
+          default-slaves:
+            - lf-pod5
+      - string:
+          name: GIT_BASE
+          default: https://gerrit.opnfv.org/gerrit/$PROJECT
+          description: 'Git URL to use on this Jenkins Slave'
+      - string:
+          name: SSH_KEY
+          default: /root/.ssh/id_rsa
+          description: 'SSH key to use for Apex'
+
 #####################################################
 # Parameters for CI baremetal PODs
 #####################################################
index bf42f6e..e162825 100644 (file)
@@ -6,6 +6,8 @@
       - '{name}'
       - '{name}-tools'
 
+    disabled: false
+
     jobs:
       - '{project}-verify-basic'
       - 'backup-pharos-dashboard'
@@ -29,7 +31,7 @@
           mkdir -p $BACKUP_DIR
           echo "-- $(date +%Y%m%d) --"
           echo "Backing up Pharos Dashboard data..."
-          sudo docker run -it --rm \
+          sudo docker run --rm \
             -v pharos-data:/pharos-data:ro \
             -v $TMP_DIR:/backup \
             alpine \
index 69a9f89..28e5b7c 100644 (file)
@@ -12,8 +12,8 @@ set -o nounset
 set -o pipefail
 
 
-
-echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..."
+echo "Using Docker $(docker --version) on $NODE_NAME"
+echo "Starting Docker build for $DOCKER_REPO_NAME ..."
 echo "--------------------------------------------------------"
 echo
 
index fd0b9bd..317efc8 100644 (file)
           project: 'releng-anteater'
           <<: *master
           <<: *other-receivers
-      - 'barometer':
+      - 'barometer-collectd':
           project: 'barometer'
-          dockerdir: '.'
-          dockerfile: 'docker/Dockerfile'
+          dockerdir: 'docker/barometer-collectd'
           <<: *master
           <<: *other-receivers
       - 'barometer-grafana':
           project: 'barometer'
-          dockerdir: '.'
-          dockerfile: 'docker/barometer-grafana/Dockerfile'
+          dockerdir: 'docker/barometer-grafana'
           <<: *master
           <<: *other-receivers
       - 'barometer-influxdb':
           project: 'barometer'
-          dockerdir: '.'
-          dockerfile: 'docker/barometer-influxdb/Dockerfile'
+          dockerdir: 'docker/barometer-influxdb'
           <<: *master
           <<: *other-receivers
       - 'barometer-kafka':
           project: 'barometer'
-          dockerdir: '.'
-          dockerfile: 'docker/barometer-kafka/Dockerfile'
+          dockerdir: 'docker/barometer-kafka'
           <<: *master
           <<: *other-receivers
       - 'barometer-ves':
           project: 'barometer'
-          dockerdir: '.'
-          dockerfile: 'docker/barometer-ves/Dockerfile'
+          dockerdir: 'docker/barometer-ves'
           <<: *master
           <<: *other-receivers
       - 'bottlenecks':
diff --git a/jjb/xci/xci-cleanup.sh b/jjb/xci/xci-cleanup.sh
new file mode 100755 (executable)
index 0000000..45b4ec2
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+# skip the deployment if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
+    echo "Skipping the deployment!"
+    exit 0
+fi
+
+sudo virsh destroy ${DISTRO}_xci_vm
+sudo virsh undefine ${DISTRO}_xci_vm
diff --git a/jjb/xci/xci-merge-jobs.yml b/jjb/xci/xci-merge-jobs.yml
new file mode 100644 (file)
index 0000000..351fe22
--- /dev/null
@@ -0,0 +1,257 @@
+---
+- project:
+    name: 'opnfv-xci-merge'
+
+    # -------------------------------
+    # branches
+    # -------------------------------
+    stream:
+      - master:
+          branch: '{stream}'
+    # -------------------------------
+    # distros
+    # -------------------------------
+    distro:
+      - ubuntu:
+          disabled: false
+      - centos:
+          disabled: false
+      - opensuse:
+          disabled: false
+    # -------------------------------
+    # type
+    # -------------------------------
+    type:
+      - virtual
+    # -------------------------------
+    # patch verification phases
+    # -------------------------------
+    phase:
+      - 'deploy'
+      - 'healthcheck'
+      - 'promote'
+    # -------------------------------
+    # scenarios
+    # -------------------------------
+    scenario:
+      - 'os-odl-sfc':
+          project: sfc
+    # -------------------------------
+    # jobs
+    # -------------------------------
+    jobs:
+      - 'xci-{scenario}-{type}-{distro}-merge-{stream}'
+      - 'xci-{phase}-{type}-{distro}-merge-{stream}'
+# -------------------------------
+# job templates
+# -------------------------------
+- job-template:
+    name: 'xci-{scenario}-{type}-{distro}-merge-{stream}'
+
+    project-type: multijob
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    properties:
+      - logrotate-default
+      - build-blocker:
+          use-build-blocker: true
+          blocking-jobs:
+            - 'xci-verify-{distro}-.*'
+            - 'bifrost-verify-{distro}-.*'
+            - 'bifrost-periodic-{distro}-.*'
+            - 'xci-osa-verify-{distro}-.*'
+            - 'xci-osa-periodic-{distro}-.*'
+            - 'xci-(os|k8s).*?-virtual-{distro}-.*'
+          block-level: 'NODE'
+
+    wrappers:
+      - ssh-agent-wrapper
+      - build-timeout:
+          timeout: 240
+      - fix-workspace-permissions
+
+    scm:
+      - git:
+          credentials-id: '$SSH_CREDENTIAL_ID'
+          url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
+          branches:
+            - 'origin/master'
+          timeout: 15
+
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - change-merged-event
+            - comment-added-contains-event:
+                comment-contains-value: 'remerge'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{obj:project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              file-paths:
+                - compare-type: ANT
+                  pattern: 'scenarios/**'
+          readable-message: true
+          custom-url: '* $JOB_NAME $BUILD_URL'
+
+    parameters:
+      - project-parameter:
+          project: '{obj:project}'
+          branch: '{branch}'
+      - label:
+          name: SLAVE_LABEL
+          default: 'xci-virtual'
+      - string:
+          name: DEPLOY_SCENARIO
+          default: '{scenario}'
+      - string:
+          name: CLEAN_DIB_IMAGES
+          default: 'true'
+      - string:
+          name: GIT_BASE
+          default: https://gerrit.opnfv.org/gerrit/$PROJECT
+          description: 'Git URL to use on this Jenkins Slave'
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - multijob:
+          name: deploy
+          condition: SUCCESSFUL
+          projects:
+            - name: 'xci-deploy-{type}-{distro}-merge-{stream}'
+              current-parameters: true
+              predefined-parameters: |
+                PROJECT=$PROJECT
+                DISTRO={distro}
+                DEPLOY_SCENARIO={scenario}
+                CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+              node-parameters: true
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: healthcheck
+          condition: SUCCESSFUL
+          projects:
+            - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}'
+              current-parameters: true
+              predefined-parameters: |
+                PROJECT=$PROJECT
+                DISTRO={distro}
+                DEPLOY_SCENARIO={scenario}
+                CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
+                FUNCTEST_MODE=tier
+                FUNCTEST_TIER=healthcheck
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+              node-parameters: true
+              kill-phase-on: NEVER
+              abort-all-job: true
+
+- job-template:
+    name: 'xci-{phase}-{type}-{distro}-merge-{stream}'
+
+    disabled: false
+
+    concurrent: true
+
+    properties:
+      - logrotate-default
+      - build-blocker:
+          use-build-blocker: true
+          blocking-jobs:
+            - '.*-bifrost-verify-.*'
+            - '.*-bifrost-periodic-.*'
+            - 'osa-verify-.*'
+            - 'osa-periodic-.*'
+          block-level: 'NODE'
+
+    parameters:
+      - string:
+          name: PROJECT
+          default: 'releng-xci'
+      - string:
+          name: DISTRO
+          default: 'ubuntu'
+      - string:
+          name: DEPLOY_SCENARIO
+          default: 'os-nosdn-nofeature-noha'
+      - string:
+          name: FUNCTEST_MODE
+          default: 'tier'
+      - string:
+          name: FUNCTEST_SUITE_NAME
+          default: 'healthcheck'
+      - string:
+          name: XCI_FLAVOR
+          default: 'mini'
+      - string:
+          name: CLEAN_DIB_IMAGES
+          default: 'true'
+      - string:
+          name: OPNFV_RELENG_DEV_PATH
+          default: $WORKSPACE/
+      - string:
+          name: INSTALLER_TYPE
+          default: 'osa'
+      - string:
+          name: GIT_BASE
+          default: https://gerrit.opnfv.org/gerrit/$PROJECT
+          description: 'Git URL to use on this Jenkins Slave'
+
+    wrappers:
+      - ssh-agent-wrapper
+      - build-timeout:
+          timeout: 240
+      - fix-workspace-permissions
+
+    scm:
+      - git:
+          credentials-id: '$SSH_CREDENTIAL_ID'
+          url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
+          branches:
+            - 'origin/master'
+          timeout: 15
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - 'xci-merge-{phase}-macro'
+
+# -------------------------------
+# builder macros
+# -------------------------------
+- builder:
+    name: 'xci-merge-deploy-macro'
+    builders:
+      - shell:
+          !include-raw: ./xci-start-new-vm.sh
+      - shell:
+          !include-raw: ./xci-start-deployment.sh
+
+- builder:
+    name: 'xci-merge-healthcheck-macro'
+    builders:
+      - shell:
+          !include-raw: ./xci-run-functest.sh
+      - shell:
+          !include-raw: ./xci-cleanup.sh
+
+- builder:
+    name: 'xci-merge-promote-macro'
+    builders:
+      - shell:
+          !include-raw: ./xci-promote.sh
diff --git a/jjb/xci/xci-promote.sh b/jjb/xci/xci-promote.sh
new file mode 100755 (executable)
index 0000000..98ad7ff
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 Ericsson and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+# skip the healthcheck if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
+    echo "Skipping the healthcheck!"
+    exit 0
+fi
+
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
+echo "Hello World!"
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
new file mode 100755 (executable)
index 0000000..4fbc6c4
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+# skip the healthcheck if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
+    echo "Skipping the healthcheck!"
+    exit 0
+fi
+
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
+echo "Hello World!"
diff --git a/jjb/xci/xci-start-deployment.sh b/jjb/xci/xci-start-deployment.sh
new file mode 100755 (executable)
index 0000000..e86f5b3
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+# skip the deployment if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
+    echo "Skipping the deployment!"
+    exit 0
+fi
+
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
+ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh
new file mode 100755 (executable)
index 0000000..b72c339
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+# skip the deployment if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
+    echo "Skipping the deployment!"
+    exit 0
+fi
+
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
+
+cd $WORKSPACE
+
+# The start-new-vm.sh script will copy the entire releng-xci directory
+# so lets prepare the test script now so it can be copied by the script.
+# Please do not move it elsewhere or you would have to move it to the VM
+# yourself.
+cat > xci_test.sh<<EOF
+#!/bin/bash
+export DISTRO=$DISTRO
+export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+export FUNCTEST_MODE=$FUNCTEST_MODE
+export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
+export XCI_FLAVOR=$XCI_FLAVOR
+export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
+export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
+export INSTALLER_TYPE=$INSTALLER_TYPE
+export GIT_BASE=$GIT_BASE
+export JENKINS_HOME=$JENKINS_HOME
+
+if [[ ! -z ${WORKSPACE+x} && $GERRIT_PROJECT != "releng-xci" ]]; then
+    git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT xci/scenarios/$DEPLOY_SCENARIO && cd xci/scenarios/$DEPLOY_SCENARIO
+    git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD
+    cd -
+fi
+
+cd xci
+./xci-deploy.sh
+EOF
+chmod a+x xci_test.sh
+
+export XCI_BUILD_CLEAN_VM_OS=false
+export XCI_UPDATE_CLEAN_VM_OS=true
+
+./xci/scripts/vm/start-new-vm.sh $DISTRO
index fffd5c2..af2432d 100644 (file)
 - builder:
     name: 'xci-verify-deploy-macro'
     builders:
-      - shell: |
-          #!/bin/bash
-
-          # skip the deployment if the patch doesn't impact the deployment
-          if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
-              echo "Skipping the deployment!"
-              exit 0
-          fi
-
-          cd $WORKSPACE
-
-          # The start-new-vm.sh script will copy the entire releng-xci directory
-          # so lets prepare the test script now so it can be copied by the script.
-          # Please do not move it elsewhere or you would have to move it to the VM
-          # yourself.
-          cat > xci_test.sh<<EOF
-          #!/bin/bash
-          export DISTRO=$DISTRO
-          export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-          export FUNCTEST_MODE=$FUNCTEST_MODE
-          export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
-          export XCI_FLAVOR=$XCI_FLAVOR
-          export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
-          export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
-          export INSTALLER_TYPE=$INSTALLER_TYPE
-          export GIT_BASE=$GIT_BASE
-          export JENKINS_HOME=$JENKINS_HOME
-
-          cd xci
-          ./xci-deploy.sh
-          EOF
-          chmod a+x xci_test.sh
-
-          export XCI_BUILD_CLEAN_VM_OS=false
-          export XCI_UPDATE_CLEAN_VM_OS=true
-
-          ./xci/scripts/vm/start-new-vm.sh $DISTRO
-      - shell: |
-          #!/bin/bash
-
-          # skip the deployment if the patch doesn't impact the deployment
-          if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
-              echo "Skipping the deployment!"
-              exit 0
-          fi
-
-          ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
+      - shell:
+          !include-raw: ./xci-start-new-vm.sh
 
+      - shell:
+          !include-raw: ./xci-start-deployment.sh
 
 - builder:
     name: 'xci-verify-healthcheck-macro'
     builders:
-      - shell: |
-          #!/bin/bash
-
-          # skip the healthcheck if the patch doesn't impact the deployment
-          if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
-              echo "Skipping the healthcheck!"
-              exit 0
-          fi
-
-          echo "Hello World!"
-      - shell: |
-          #!/bin/bash
-
-          # skip the deployment if the patch doesn't impact the deployment
-          if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
-              echo "Skipping the deployment!"
-              exit 0
-          fi
-
-          sudo virsh destroy ${DISTRO}_xci_vm
-          sudo virsh undefine ${DISTRO}_xci_vm
-
-# this will be enabled once the xci is prepared
-# - builder:
-#    name: 'xci-verify-healthcheck-macro'
-#    builders:
-#        - shell:
-#            !include-raw: ../../utils/fetch_os_creds.sh
-#        - shell:
-#            !include-raw: ../functest/functest-alpine.sh
+      - shell:
+          !include-raw: ./xci-run-functest.sh
+      - shell:
+          !include-raw: ./xci-cleanup.sh