summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/xci')
-rw-r--r--jjb/xci/bifrost-verify-jobs.yml6
-rwxr-xr-xjjb/xci/bifrost-verify.sh21
-rw-r--r--jjb/xci/osa-periodic-jobs.yml194
-rwxr-xr-xjjb/xci/xci-cleanup.sh24
-rw-r--r--jjb/xci/xci-merge-jobs.yml257
-rwxr-xr-xjjb/xci/xci-promote.sh30
-rwxr-xr-xjjb/xci/xci-run-functest.sh30
-rwxr-xr-xjjb/xci/xci-start-deployment.sh30
-rwxr-xr-xjjb/xci/xci-start-new-vm.sh63
-rw-r--r--jjb/xci/xci-verify-jobs.yml113
10 files changed, 577 insertions, 191 deletions
diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml
index f8d39b2fb..e4c2d0e5b 100644
--- a/jjb/xci/bifrost-verify-jobs.yml
+++ b/jjb/xci/bifrost-verify-jobs.yml
@@ -70,7 +70,9 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
+ - 'xci-verify-{distro}-.*'
- '.*-bifrost-verify.*-{type}'
+
block-level: 'NODE'
parameters:
@@ -78,9 +80,6 @@
name: PROJECT_REPO
default: 'https://git.openstack.org/openstack/bifrost'
- string:
- name: CLONE_LOCATION
- default: '$WORKSPACE/bifrost'
- - string:
name: DISTRO
default: '{distro}'
- string:
@@ -173,6 +172,7 @@
- comment-added-contains-event:
comment-contains-value: 'recheck'
silent-start: true
+ custom-url: '* $JOB_NAME $BUILD_URL'
projects:
- project-compare-type: 'PLAIN'
project-pattern: 'openstack/bifrost'
diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh
index a86ba91c3..451f33b4b 100755
--- a/jjb/xci/bifrost-verify.sh
+++ b/jjb/xci/bifrost-verify.sh
@@ -11,25 +11,25 @@ set -o errexit
set -o nounset
set -o pipefail
-git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost
git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci
-# checkout the patch
-cd $CLONE_LOCATION
+cd $WORKSPACE
git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
# combine opnfv and upstream scripts/playbooks
-/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/bifrost/
+/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/
cd $WORKSPACE/releng-xci
cat > bifrost_test.sh<<EOF
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
cd ~/bifrost
# provision 3 VMs; xcimaster, controller, and compute
./scripts/bifrost-provision.sh
-# list the provisioned VMs
-source env-vars
-ironic node-list
sudo -H -E virsh list
EOF
chmod a+x bifrost_test.sh
@@ -41,8 +41,11 @@ case ${DISTRO} in
*suse*) VM_DISTRO=opensuse ;;
esac
+export XCI_BUILD_CLEAN_VM_OS=false
+export XCI_UPDATE_CLEAN_VM_OS=true
+
./xci/scripts/vm/start-new-vm.sh $VM_DISTRO
-rsync -a $WORKSPACE/releng-xci ${VM_DISTRO}_xci_vm:~/bifrost
+rsync -a -e "ssh -F $HOME/.ssh/xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
-ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost && ./bifrost_test.sh"
+ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"
diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml
index 26c1575f4..64daa696b 100644
--- a/jjb/xci/osa-periodic-jobs.yml
+++ b/jjb/xci/osa-periodic-jobs.yml
@@ -2,7 +2,7 @@
- project:
name: 'opnfv-osa-periodic'
- project: 'releng-xci'
+ project: openstack-ansible
# -------------------------------
# branches
# -------------------------------
@@ -13,19 +13,19 @@
# distros
# -------------------------------
distro:
- - 'xenial':
+ - ubuntu:
+ disabled: false
+ - centos:
+ disabled: false
+ - opensuse:
disabled: false
- - 'centos7':
- disabled: true
- - 'suse':
- disabled: true
# -------------------------------
# type
# -------------------------------
type:
- virtual
# -------------------------------
- # phases
+ # periodic deploy & test phases
# -------------------------------
phase:
- 'deploy'
@@ -34,32 +34,37 @@
# jobs
# -------------------------------
jobs:
- - 'osa-periodic-{distro}-{type}-{stream}'
- - 'osa-periodic-{phase}-{type}-{stream}'
-
+ - 'xci-osa-periodic-{distro}-{type}-{stream}'
+ - 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}'
# -------------------------------
# job templates
# -------------------------------
- job-template:
- name: 'osa-periodic-{distro}-{type}-{stream}'
+ name: 'xci-osa-periodic-{distro}-{type}-{stream}'
project-type: multijob
disabled: '{obj:disabled}'
- concurrent: false
+ concurrent: true
properties:
- logrotate-default
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'xci-verify-.*'
- - 'bifrost-verify-.*'
- - 'bifrost-periodic-.*'
- - 'osa-verify-.*'
- - 'osa-periodic-.*'
+ - 'xci-verify-{distro}-.*'
+ - 'bifrost-verify-{distro}-.*'
+ - 'bifrost-periodic-{distro}-.*'
+ - 'xci-osa-verify-{distro}-.*'
+ - 'xci-osa-periodic-{distro}-.*'
block-level: 'NODE'
+ - throttle:
+ max-per-node: 2
+ max-total: 10
+ categories:
+ - xci-verify-virtual
+ option: category
wrappers:
- ssh-agent-wrapper
@@ -68,12 +73,7 @@
- fix-workspace-permissions
scm:
- - git-scm-osa
-
- triggers:
- - pollscm:
- cron: "@midnight"
- ignore-post-commit-hooks: true
+ - git-scm-openstack
parameters:
- project-parameter:
@@ -81,7 +81,17 @@
branch: '{branch}'
- label:
name: SLAVE_LABEL
- default: 'xci-virtual-{distro}'
+ default: 'xci-virtual'
+ - string:
+ name: OPENSTACK_OSA_VERSION
+ default: 'master'
+ - string:
+ name: CLEAN_DIB_IMAGES
+ default: 'true'
+ - string:
+ name: GIT_BASE
+ default: 'https://git.openstack.org/openstack/$PROJECT'
+ description: 'Git URL to use on this Jenkins Slave'
builders:
- description-setter:
@@ -90,32 +100,38 @@
name: deploy
condition: SUCCESSFUL
projects:
- - name: 'osa-periodic-deploy-{type}-{stream}'
+ - name: 'xci-osa-periodic-{distro}-deploy-{type}-{stream}'
current-parameters: true
predefined-parameters: |
DISTRO={distro}
DEPLOY_SCENARIO=os-nosdn-nofeature-noha
- git-revision: true
+ OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
+ BRANCH=$BRANCH
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
+ git-revision: true
- multijob:
name: healthcheck
condition: SUCCESSFUL
projects:
- - name: 'osa-periodic-healthcheck-{type}-{stream}'
+ - name: 'xci-osa-periodic-{distro}-healthcheck-{type}-{stream}'
current-parameters: true
predefined-parameters: |
DISTRO={distro}
DEPLOY_SCENARIO=os-nosdn-nofeature-noha
+ OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
FUNCTEST_MODE=tier
FUNCTEST_TIER=healthcheck
+ BRANCH=$BRANCH
node-parameters: true
kill-phase-on: NEVER
- abort-all-job: false
+ abort-all-job: true
- job-template:
- name: 'osa-periodic-{phase}-{type}-{stream}'
+ name: 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}'
disabled: false
@@ -126,41 +142,23 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'xci-verify-deploy-.*'
- - 'xci-verify-healthcheck-.*'
- - 'bifrost-verify-.*'
- - 'bifrost-periodic-.*'
- - 'osa-verify-deploy-.*'
- - 'osa-verify-halthcheck-.*'
- - 'osa-periodic-deploy-.*'
- - 'osa-periodic-healthcheck-.*'
+ - '.*-bifrost-verify-.*'
+ - '.*-bifrost-periodic-.*'
block-level: 'NODE'
parameters:
- project-parameter:
project: '{project}'
branch: '{branch}'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual-{distro}'
- - string:
- name: OPENSTACK_OSA_VERSION
- default: 'master'
- string:
name: DISTRO
- default: 'xenial'
+ default: 'ubuntu'
- string:
name: DEPLOY_SCENARIO
default: 'os-nosdn-nofeature-noha'
- string:
- name: XCI_FLAVOR
- default: 'mini'
- - string:
- name: XCI_LOOP
- default: 'periodic'
- - string:
- name: OPNFV_RELENG_DEV_PATH
- default: $WORKSPACE/releng-xci
+ name: OPENSTACK_OSA_VERSION
+ default: 'master'
- string:
name: FUNCTEST_MODE
default: 'tier'
@@ -168,14 +166,18 @@
name: FUNCTEST_SUITE_NAME
default: 'healthcheck'
- string:
- name: FORCE_MASTER
+ name: XCI_FLAVOR
+ default: 'mini'
+ - string:
+ name: CLEAN_DIB_IMAGES
default: 'true'
- string:
+ name: INSTALLER_TYPE
+ default: 'osa'
+ - string:
name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
-
- scm:
- - git-scm-osa
+ default: 'https://git.openstack.org/openstack/$PROJECT'
+ description: 'Git URL to use on this Jenkins Slave'
wrappers:
- ssh-agent-wrapper
@@ -183,48 +185,76 @@
timeout: 240
- fix-workspace-permissions
+ scm:
+ - git-scm-openstack
+
builders:
- description-setter:
description: "Built on $NODE_NAME"
- - 'osa-periodic-{phase}-macro'
+ - 'xci-osa-periodic-{phase}-macro'
# -------------------------------
# builder macros
# -------------------------------
- builder:
- name: 'osa-periodic-deploy-macro'
+ name: 'xci-osa-periodic-deploy-macro'
builders:
- shell: |
#!/bin/bash
- # here we will
- # - clone releng-xci repo as the jobs are running against openstack gerrit
- # and we need to clone releng-xci ourselves to $OPNFV_RELENG_DEV_PATH
- # - run sources-branch-updater.sh from osa to update/pin the role versions
- # at the time this job gets triggered against osa master in case if the
- # deployment succeeds and we decide to bump version used by xci
- # - copy generated role versions into $OPNFV_RELENG_DEV_PATH/xci/file
- # - start the deployment by executing xci-deploy.sh as usual
- #
- # we might also need to pin versions of openstack services as well.
+ 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 OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ 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
+
+ ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
- echo "Hello World!"
- builder:
- name: 'osa-periodic-healthcheck-macro'
+ name: 'xci-osa-periodic-healthcheck-macro'
builders:
- shell: |
#!/bin/bash
echo "Hello World!"
-# -------------------------------
-# scm macro
-# -------------------------------
-- scm:
- name: git-scm-osa
- scm:
- - git:
- url: https://review.openstack.org/p/openstack/openstack-ansible.git
- branches:
- - master
- timeout: 15
+ - shell: |
+ #!/bin/bash
+
+ 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
diff --git a/jjb/xci/xci-cleanup.sh b/jjb/xci/xci-cleanup.sh
new file mode 100755
index 000000000..45b4ec273
--- /dev/null
+++ b/jjb/xci/xci-cleanup.sh
@@ -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
index 000000000..351fe22bb
--- /dev/null
+++ b/jjb/xci/xci-merge-jobs.yml
@@ -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
index 000000000..98ad7ff4a
--- /dev/null
+++ b/jjb/xci/xci-promote.sh
@@ -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
index 000000000..b2421de32
--- /dev/null
+++ b/jjb/xci/xci-run-functest.sh
@@ -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
+
+ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/run-functest.yml"
diff --git a/jjb/xci/xci-start-deployment.sh b/jjb/xci/xci-start-deployment.sh
new file mode 100755
index 000000000..e86f5b3a1
--- /dev/null
+++ b/jjb/xci/xci-start-deployment.sh
@@ -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
index 000000000..b72c33920
--- /dev/null
+++ b/jjb/xci/xci-start-new-vm.sh
@@ -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
diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml
index 93ca18708..3c314568f 100644
--- a/jjb/xci/xci-verify-jobs.yml
+++ b/jjb/xci/xci-verify-jobs.yml
@@ -68,8 +68,8 @@
- 'xci-verify-{distro}-.*'
- 'bifrost-verify-{distro}-.*'
- 'bifrost-periodic-{distro}-.*'
- - 'osa-verify-{distro}-.*'
- - 'osa-periodic-{distro}-.*'
+ - 'xci-osa-verify-{distro}-.*'
+ - 'xci-osa-periodic-{distro}-.*'
block-level: 'NODE'
- throttle:
max-per-node: 2
@@ -106,22 +106,12 @@
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
- disable-strict-forbidden-file-verification: 'true'
- file-paths:
- - compare-type: ANT
- pattern: 'bifrost/**'
- - compare-type: ANT
- pattern: 'xci/**'
+ disable-strict-forbidden-file-verification: 'false'
forbidden-file-paths:
- compare-type: ANT
- pattern: 'prototypes/**'
- - compare-type: ANT
- pattern: 'upstream/**'
- - compare-type: ANT
- pattern: '**/README.rst'
- - compare-type: ANT
- pattern: 'docs/**'
+ pattern: 'xci/scripts/vm/**'
readable-message: true
+ custom-url: '* $JOB_NAME $BUILD_URL'
skip-vote:
successful: '{obj:successful}'
failed: '{obj:failed}'
@@ -154,7 +144,7 @@
current-parameters: true
predefined-parameters: |
DISTRO={distro}
- DEPLOY_SCENARIO=os-nosdn-nofeature-noha
+ DEPLOY_SCENARIO=os-nosdn-nofeature
CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
@@ -171,7 +161,7 @@
current-parameters: true
predefined-parameters: |
DISTRO={distro}
- DEPLOY_SCENARIO=os-nosdn-nofeature-noha
+ DEPLOY_SCENARIO=os-nosdn-nofeature
CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
FUNCTEST_MODE=tier
FUNCTEST_TIER=healthcheck
@@ -195,8 +185,8 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'bifrost-verify-.*'
- - 'bifrost-periodic-.*'
+ - '.*-bifrost-verify-.*'
+ - '.*-bifrost-periodic-.*'
- 'osa-verify-.*'
- 'osa-periodic-.*'
block-level: 'NODE'
@@ -210,7 +200,7 @@
default: 'ubuntu'
- string:
name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-noha'
+ default: 'os-nosdn-nofeature'
- string:
name: FUNCTEST_MODE
default: 'tier'
@@ -254,85 +244,14 @@
- 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-cleanup.sh