summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/xci')
-rw-r--r--jjb/xci/bifrost-cleanup-job.yaml146
-rw-r--r--jjb/xci/bifrost-periodic-jobs.yaml154
-rwxr-xr-xjjb/xci/bifrost-provision.sh109
-rw-r--r--jjb/xci/bifrost-verify-jobs.yaml225
-rwxr-xr-xjjb/xci/bifrost-verify.sh54
-rw-r--r--jjb/xci/osa-periodic-jobs.yaml263
-rwxr-xr-xjjb/xci/xci-cleanup.sh28
-rw-r--r--jjb/xci/xci-daily-jobs.yaml356
-rwxr-xr-xjjb/xci/xci-deploy.sh75
-rw-r--r--jjb/xci/xci-merge-jobs.yaml492
-rwxr-xr-xjjb/xci/xci-promote.sh51
-rw-r--r--jjb/xci/xci-rtd-jobs.yaml13
-rwxr-xr-xjjb/xci/xci-run-functest.sh77
-rwxr-xr-xjjb/xci/xci-set-scenario.sh265
-rwxr-xr-xjjb/xci/xci-start-deployment.sh45
-rwxr-xr-xjjb/xci/xci-start-new-vm.sh93
-rw-r--r--jjb/xci/xci-verify-jobs.yaml327
-rw-r--r--jjb/xci/xci-views.yaml6
18 files changed, 0 insertions, 2779 deletions
diff --git a/jjb/xci/bifrost-cleanup-job.yaml b/jjb/xci/bifrost-cleanup-job.yaml
deleted file mode 100644
index d51776173..000000000
--- a/jjb/xci/bifrost-cleanup-job.yaml
+++ /dev/null
@@ -1,146 +0,0 @@
----
-- project:
- name: 'openstack-bifrost-cleanup'
- # -------------------------------
- # branches
- # -------------------------------
- stream:
- - master:
- branch: '{stream}'
-
- # -------------------------------
- # projects
- # -------------------------------
- project:
- - 'openstack':
- project-repo: 'https://git.openstack.org/openstack/bifrost'
- clone-location: '/opt/bifrost'
- - 'opnfv':
- project-repo: 'https://gerrit.opnfv.org/gerrit/releng-xci'
- clone-location: '/opt/releng-xci'
-
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - '{project}-bifrost-cleanup-{stream}'
-
-- job-template:
- name: '{project}-bifrost-cleanup-{stream}'
-
- disabled: true
- concurrent: false
-
- node: bifrost-verify-virtual
-
- # Make sure no verify job is running on any of the slaves since that would
- # produce build logs after we wipe the destination directory.
- properties:
- - build-blocker:
- blocking-jobs:
- - '{project}-bifrost-verify-*'
-
- parameters:
- - string:
- name: PROJECT
- default: '{project}'
-
- builders:
- - shell: |
- #!/bin/bash
-
- set -eu
-
- # DO NOT change this unless you know what you are doing.
- BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
-
- # This should never happen... even 'recheck' uses the last jobs'
- # gerrit information. Better exit with error so we can investigate
- [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1
-
- echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER"
-
- if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then
- echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid"
- echo "bifrost location on the Google storage server. Please double-check"
- echo "that it's set properly or fix this line if necessary."
- echo "gsutil will not be executed until this is fixed!"
- exit 1
- fi
- try_to_rm=1
- while [[ $try_to_rm -lt 6 ]]; do
- gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break
- _exitcode=$?
- echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)"
- let try_to_rm += 1
- # Give it some time...
- sleep 10
- done
- exit $_exitcode
-
- triggers:
- - '{project}-gerrit-trigger-cleanup':
- branch: '{branch}'
-
- publishers:
- # yamllint disable rule:line-length
- - email:
- recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
- # yamllint enable rule:line-length
- - email-jenkins-admins-on-failure
-# -------------------------------
-# trigger macros
-# -------------------------------
-- trigger:
- name: 'openstack-gerrit-trigger-cleanup'
- triggers:
- - gerrit:
- server-name: 'review.openstack.org'
- escape-quotes: true
- trigger-on:
- # We only run this when the change is merged or
- # abandoned since we don't need the logs anymore
- - change-merged-event
- - change-abandoned-event
- # This is an OPNFV maintenance job. We don't want to provide
- # feedback on Gerrit
- silent: true
- silent-start: true
- projects:
- - project-compare-type: 'PLAIN'
- project-pattern: 'openstack/bifrost'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- disable-strict-forbidden-file-verification: 'true'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'doc/**'
- - compare-type: ANT
- pattern: 'releasenotes/**'
- readable-message: true
-
-- trigger:
- name: 'opnfv-gerrit-trigger-cleanup'
- triggers:
- - gerrit:
- server-name: 'gerrit.opnfv.org'
- trigger-on:
- # We only run this when the change is merged or
- # abandoned since we don't need the logs anymore
- - change-merged-event
- - change-abandoned-event
- # This is an OPNFV maintenance job. We don't want to provide
- # feedback on Gerrit
- silent: true
- silent-start: true
- projects:
- - project-compare-type: 'ANT'
- project-pattern: 'releng-xci'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- file-paths:
- - compare-type: ANT
- pattern: 'bifrost/**'
- readable-message: true
diff --git a/jjb/xci/bifrost-periodic-jobs.yaml b/jjb/xci/bifrost-periodic-jobs.yaml
deleted file mode 100644
index 4c61be193..000000000
--- a/jjb/xci/bifrost-periodic-jobs.yaml
+++ /dev/null
@@ -1,154 +0,0 @@
----
-- project:
- project: 'releng-xci'
-
- name: 'bifrost-periodic'
- # -------------------------------
- # Branch Anchors
- # -------------------------------
- # the versions stated here default to branches which then later
- # on used for checking out the branches, pulling in head of the branch.
- master: &master
- stream: master
- openstack-bifrost-version: '{stream}'
- opnfv-releng-version: 'master'
- gs-pathname: ''
- ocata: &ocata
- stream: ocata
- openstack-bifrost-version: 'stable/{stream}'
- opnfv-releng-version: 'master'
- gs-pathname: '/{stream}'
- # -------------------------------
- # XCI PODs
- # -------------------------------
- pod:
- - virtual:
- <<: *master
- - virtual:
- <<: *ocata
- # -------------------------------
- # XCI PODs
- # -------------------------------
- # -------------------------------
- # Supported Distros
- # -------------------------------
- distro:
- - 'xenial':
- disabled: false
- slave-label: xci-xenial-virtual
- dib-os-release: 'xenial'
- dib-os-element: 'ubuntu-minimal'
- # yamllint disable rule:line-length
- dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables'
- # yamllint enable rule:line-length
- extra-dib-elements: 'openssh-server'
- - 'centos7':
- disabled: true
- slave-label: xci-centos7-virtual
- dib-os-release: '7'
- dib-os-element: 'centos7'
- dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
- extra-dib-elements: 'openssh-server'
- - 'suse':
- disabled: true
- slave-label: xci-suse-virtual
- dib-os-release: '42.3'
- dib-os-element: 'opensuse-minimal'
- dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
- extra-dib-elements: 'openssh-server'
-
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'bifrost-provision-{pod}-{distro}-periodic-{stream}'
-
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'bifrost-provision-{pod}-{distro}-periodic-{stream}'
-
- disabled: '{obj:disabled}'
-
- concurrent: false
-
- properties:
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '^xci-os.*'
- - '^xci-deploy.*'
- - '^xci-functest.*'
- - '^bifrost-.*periodic.*'
- - '^osa-.*periodic.*'
- blocking-level: 'NODE'
- - logrotate-default
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{opnfv-releng-version}'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- - string:
- name: XCI_FLAVOR
- default: 'ha'
- - string:
- name: OPENSTACK_BIFROST_VERSION
- default: '{openstack-bifrost-version}'
- - string:
- name: OPNFV_RELENG_VERSION
- default: '{opnfv-releng-version}'
- - string:
- name: DISTRO
- default: '{distro}'
- - string:
- name: DIB_OS_RELEASE
- default: '{dib-os-release}'
- - string:
- name: DIB_OS_ELEMENT
- default: '{dib-os-element}'
- - string:
- name: DIB_OS_PACKAGES
- default: '{dib-os-packages}'
- - string:
- name: EXTRA_DIB_ELEMENTS
- default: '{extra-dib-elements}'
- - string:
- name: CLEAN_DIB_IMAGES
- default: 'true'
- - label:
- name: SLAVE_LABEL
- default: '{slave-label}'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: CI_LOOP
- default: 'periodic'
-
- wrappers:
- - fix-workspace-permissions
-
- scm:
- - git-scm
-
- # trigger is disabled until we know which jobs we will have
- # and adjust stuff accordingly
- triggers:
- - timed: '' # '@midnight'
-
- builders:
- - description-setter:
- description: "Built on $NODE_NAME - Flavor: $XCI_FLAVOR"
- - 'bifrost-provision-builder'
-
-# --------------------------
-# builder macros
-# --------------------------
-- builder:
- name: bifrost-provision-builder
- builders:
- - shell:
- !include-raw: ./bifrost-provision.sh
diff --git a/jjb/xci/bifrost-provision.sh b/jjb/xci/bifrost-provision.sh
deleted file mode 100755
index 4d646a676..000000000
--- a/jjb/xci/bifrost-provision.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 Ericsson AB 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
-##############################################################################
-set -o errexit
-set -o nounset
-set -o pipefail
-
-trap cleanup_and_upload EXIT
-
-function fix_ownership() {
- if [ -z "${JOB_URL+x}" ]; then
- echo "Not running as part of Jenkins. Handle the logs manually."
- else
- # Make sure cache exists
- [[ ! -d ${HOME}/.cache ]] && mkdir ${HOME}/.cache
-
- sudo chown -R jenkins:jenkins $WORKSPACE
- sudo chown -R jenkins:jenkins ${HOME}/.cache
- fi
-}
-
-function cleanup_and_upload() {
- original_exit=$?
- fix_ownership
- exit $original_exit
-}
-
-# check distro to see if we support it
-if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then
- echo "Distro $DISTRO is not supported!"
- exit 1
-fi
-
-# remove previously cloned repos
-sudo /bin/rm -rf /opt/bifrost /opt/openstack-ansible /opt/releng-xci /opt/functest
-
-# Fix up permissions
-fix_ownership
-
-# ensure the versions to checkout are set
-export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-master}
-export OPNFV_RELENG_VERSION=${OPNFV_RELENG_VERSION:-master}
-
-# log some info
-echo -e "\n"
-echo "***********************************************************************"
-echo "* *"
-echo "* Provision OpenStack Nodes *"
-echo "* *"
-echo " bifrost version: $OPENSTACK_BIFROST_VERSION"
-echo " releng version: $OPNFV_RELENG_VERSION"
-echo "* *"
-echo "***********************************************************************"
-echo -e "\n"
-
-# clone the repos and checkout the versions
-sudo git clone --quiet https://git.openstack.org/openstack/bifrost /opt/bifrost
-cd /opt/bifrost && sudo git checkout --quiet $OPENSTACK_BIFROST_VERSION
-echo "xci: using bifrost commit"
-git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>'
-
-sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci
-cd /opt/releng-xci && sudo git checkout --quiet $OPNFV_RELENG_VERSION
-echo "xci: using releng commit"
-git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>'
-
-# source flavor vars
-source "$WORKSPACE/xci/config/${XCI_FLAVOR}-vars"
-
-# combine opnfv and upstream scripts/playbooks
-sudo /bin/cp -rf /opt/releng-xci/bifrost/* /opt/bifrost/
-
-# cleanup remnants of previous deployment
-cd /opt/bifrost
-sudo -E ./scripts/destroy-env.sh
-
-# provision VMs for the flavor
-cd /opt/bifrost
-./scripts/bifrost-provision.sh
-
-# list the provisioned VMs
-cd /opt/bifrost
-source env-vars
-ironic node-list
-sudo -H -E virsh list
-
-echo "OpenStack nodes are provisioned!"
-# here we have to do something in order to capture what was the working sha1
-# hardcoding stuff for the timebeing
-
-cd /opt/bifrost
-BIFROST_GIT_SHA1=$(git rev-parse HEAD)
-
-# log some info
-echo -e "\n"
-echo "***********************************************************************"
-echo "* BIFROST SHA1 TO PIN *"
-echo "* *"
-echo " $BIFROST_GIT_SHA1"
-echo "* *"
-echo "***********************************************************************"
-
-echo -e "\n"
diff --git a/jjb/xci/bifrost-verify-jobs.yaml b/jjb/xci/bifrost-verify-jobs.yaml
deleted file mode 100644
index f895cf672..000000000
--- a/jjb/xci/bifrost-verify-jobs.yaml
+++ /dev/null
@@ -1,225 +0,0 @@
----
-- project:
- name: 'openstack-bifrost-verify'
- # -------------------------------
- # branches
- # -------------------------------
- stream:
- - master:
- branch: '{stream}'
- # -------------------------------
- # distros
- # -------------------------------
- distro:
- - 'xenial':
- disabled: true
- dib-os-release: 'xenial'
- dib-os-element: 'ubuntu-minimal'
- dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl'
- extra-dib-elements: 'openssh-server'
- - 'centos7':
- disabled: true
- dib-os-release: '7'
- dib-os-element: 'centos-minimal'
- dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
- extra-dib-elements: 'openssh-server'
- - 'opensuse423':
- disabled: true
- dib-os-release: '42.3'
- dib-os-element: 'opensuse-minimal'
- dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
- extra-dib-elements: 'openssh-server'
- # -------------------------------
- # type
- # -------------------------------
- type:
- - virtual
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'openstack-bifrost-verify-{distro}-{type}-{stream}'
-
-# -------------------------------
-# VM defaults
-# -------------------------------
-- defaults:
- name: verify_vm_defaults
- test-vm-num-nodes: '3'
- test-vm-node-names: 'opnfv controller00 compute00'
- vm-domain-type: 'kvm'
- vm-cpu: '2'
- vm-disk: '30'
- vm-memory-size: '4096'
- vm-disk-cache: 'unsafe'
-
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'openstack-bifrost-verify-{distro}-{type}-{stream}'
-
- disabled: '{obj:disabled}'
-
- defaults: verify_vm_defaults
-
- concurrent: false
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - 'xci-verify-{distro}-.*'
- - 'xci-.*-{distro}-merge-.*'
- - '.*-bifrost-verify.*-{type}'
- - throttle:
- max-per-node: 2
- max-total: 10
- categories:
- - xci-verify-virtual
- option: category
-
- blocking-level: 'NODE'
-
- parameters:
- - string:
- name: PROJECT_REPO
- default: 'https://git.openstack.org/openstack/bifrost'
- - string:
- name: DISTRO
- default: '{distro}'
- - string:
- name: DIB_OS_RELEASE
- default: '{dib-os-release}'
- - string:
- name: DIB_OS_ELEMENT
- default: '{dib-os-element}'
- - string:
- name: EXTRA_DIB_ELEMENTS
- default: '{extra-dib-elements}'
- - string:
- name: DIB_OS_PACKAGES
- default: '{dib-os-packages}'
- - string:
- name: TEST_VM_NUM_NODES
- default: '{test-vm-num-nodes}'
- - string:
- name: TEST_VM_NODE_NAMES
- default: '{test-vm-node-names}'
- - string:
- name: VM_DOMAIN_TYPE
- default: '{vm-domain-type}'
- - string:
- name: VM_CPU
- default: '{vm-cpu}'
- - string:
- name: VM_DISK
- default: '{vm-disk}'
- - string:
- name: VM_MEMORY_SIZE
- default: '{vm-memory-size}'
- - string:
- name: VM_DISK_CACHE
- default: '{vm-disk-cache}'
- - string:
- name: CLEAN_DIB_IMAGES
- default: 'true'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: CI_LOOP
- default: 'verify'
-
- scm:
- - git:
- url: '$PROJECT_REPO'
- refspec: '$GERRIT_REFSPEC'
- branches:
- - 'origin/$BRANCH'
- skip-tag: true
- choosing-strategy: 'gerrit'
- timeout: 10
- wipe-workspace: true
-
- triggers:
- - 'openstack-gerrit-trigger':
- branch: '{branch}'
-
- builders:
- - bifrost-set-name
- - bifrost-build
-
- wrappers:
- - fix-workspace-permissions
- - build-timeout:
- timeout: 180
-
- publishers:
- # yamllint disable rule:line-length
- - email:
- recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
- # yamllint enable rule:line-length
- - email-jenkins-admins-on-failure
- - postbuildscript:
- builders:
- - role: BOTH
- build-on:
- - ABORTED
- - FAILURE
- - NOT_BUILT
- - SUCCESS
- - UNSTABLE
- build-steps:
- - shell: !include-raw: ./xci-cleanup.sh
- mark-unstable-if-failed: true
-
-# -------------------------------
-# trigger macros
-# -------------------------------
-- trigger:
- name: 'openstack-gerrit-trigger'
- triggers:
- - gerrit:
- server-name: 'review.openstack.org'
- escape-quotes: true
- trigger-on:
- - patchset-created-event:
- exclude-drafts: 'false'
- exclude-trivial-rebase: 'false'
- exclude-no-code-change: 'false'
- - 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'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- disable-strict-forbidden-file-verification: 'true'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'doc/**'
- - compare-type: ANT
- pattern: 'releasenotes/**'
- readable-message: true
-
-# --------------------------
-# builder macros
-# --------------------------
-- builder:
- name: bifrost-set-name
- builders:
- - description-setter:
- description: "Built on $NODE_NAME"
-
-- builder:
- name: bifrost-build
- builders:
- - shell:
- !include-raw: ./bifrost-verify.sh
diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh
deleted file mode 100755
index c810212e3..000000000
--- a/jjb/xci/bifrost-verify.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 Ericsson AB 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
-##############################################################################
-set -o errexit
-set -o nounset
-set -o pipefail
-
-git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci
-
-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/xci/infra/bifrost/* $WORKSPACE/
-
-cd $WORKSPACE/releng-xci
-cat > bifrost_test.sh<<EOF
-#!/bin/bash
-set -o errexit
-set -o nounset
-set -o pipefail
-
-cd ~/bifrost
-# set path for XCI repository
-export XCI_PATH=~/bifrost/releng-xci
-
-# provision 3 VMs; xcimaster, controller, and compute
-./scripts/bifrost-provision.sh | ts
-
-sudo -H -E virsh list
-EOF
-chmod a+x bifrost_test.sh
-
-# Fix up distros
-case ${DISTRO} in
- xenial) VM_DISTRO=ubuntu ;;
- centos7) VM_DISTRO=centos ;;
- *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 -e "ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
-
-ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"
diff --git a/jjb/xci/osa-periodic-jobs.yaml b/jjb/xci/osa-periodic-jobs.yaml
deleted file mode 100644
index b731bf52b..000000000
--- a/jjb/xci/osa-periodic-jobs.yaml
+++ /dev/null
@@ -1,263 +0,0 @@
----
-- project:
- name: 'opnfv-osa-periodic'
-
- project: openstack-ansible
- # -------------------------------
- # branches
- # -------------------------------
- stream:
- - master:
- branch: '{stream}'
- # -------------------------------
- # distros
- # -------------------------------
- distro:
- - ubuntu:
- disabled: false
- - centos:
- disabled: false
- - opensuse:
- disabled: false
- # -------------------------------
- # type
- # -------------------------------
- type:
- - virtual
- # -------------------------------
- # periodic deploy & test phases
- # -------------------------------
- phase:
- - 'deploy'
- - 'healthcheck'
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'xci-osa-periodic-{distro}-{type}-{stream}'
- - 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}'
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'xci-osa-periodic-{distro}-{type}-{stream}'
-
- project-type: multijob
-
- disabled: '{obj:disabled}'
-
- concurrent: true
-
- 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}-.*'
- blocking-level: 'NODE'
- - throttle:
- max-per-node: 2
- max-total: 10
- categories:
- - xci-verify-virtual
- option: category
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-openstack
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - 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:
- description: "Built on $NODE_NAME"
- - multijob:
- name: deploy
- condition: SUCCESSFUL
- projects:
- - name: 'xci-osa-periodic-{distro}-deploy-{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
- BRANCH=$BRANCH
- node-parameters: true
- kill-phase-on: FAILURE
- abort-all-job: true
- git-revision: true
- - multijob:
- name: healthcheck
- condition: SUCCESSFUL
- projects:
- - 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: true
-
-- job-template:
- name: 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}'
-
- disabled: false
-
- concurrent: true
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '.*-bifrost-verify-.*'
- - '.*-bifrost-periodic-.*'
- blocking-level: 'NODE'
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - string:
- name: DISTRO
- default: 'ubuntu'
- - string:
- name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-noha'
- - string:
- name: OPENSTACK_OSA_VERSION
- default: 'master'
- - 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: INSTALLER_TYPE
- default: 'osa'
- - string:
- name: GIT_BASE
- default: 'https://git.openstack.org/openstack/$PROJECT'
- description: 'Git URL to use on this Jenkins Slave'
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-openstack
-
- builders:
- - description-setter:
- description: "Built on $NODE_NAME"
- - 'xci-osa-periodic-{phase}-macro'
-
-# -------------------------------
-# builder macros
-# -------------------------------
-- builder:
- name: 'xci-osa-periodic-deploy-macro'
- builders:
- - shell: |
- #!/bin/bash
-
- 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 CORE_OPENSTACK_INSTALL=true
- 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/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
-
-
-- builder:
- name: 'xci-osa-periodic-healthcheck-macro'
- builders:
- - shell: |
- #!/bin/bash
-
- echo "Hello World!"
- - shell: |
- #!/bin/bash
-
- sudo virsh destroy ${DISTRO}_xci_vm || true
- sudo virsh undefine ${DISTRO}_xci_vm || true
-
-# 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
deleted file mode 100755
index 51a863da2..000000000
--- a/jjb/xci/xci-cleanup.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/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.
-#----------------------------------------------------------------------
-
-# Need to cover macros with and without parameters
-VM_NAME=$DISTRO
-VM_NAME+=_xci_vm
-
-# 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 $VM_NAME || true
-sudo virsh undefine $VM_NAME || true
diff --git a/jjb/xci/xci-daily-jobs.yaml b/jjb/xci/xci-daily-jobs.yaml
deleted file mode 100644
index fe3da8b3c..000000000
--- a/jjb/xci/xci-daily-jobs.yaml
+++ /dev/null
@@ -1,356 +0,0 @@
----
-- project:
- project: 'releng-xci'
-
- name: 'xci-daily'
-
- # -------------------------------
- # Branch Anchors
- # -------------------------------
- master: &master
- stream: master
- opnfv-releng-version: master
- gs-pathname: ''
-
- # -------------------------------
- # Scenarios
- # -------------------------------
- scenario:
- - 'os-nosdn-nofeature-noha':
- deploy-scenario: 'os-nosdn-nofeature'
- installer-type: 'osa'
- xci-flavor: 'noha'
- - 'k8-calico-nofeature-noha':
- deploy-scenario: 'k8-calico-nofeature'
- installer-type: 'kubespray'
- xci-flavor: 'noha'
-
- # -------------------------------
- # XCI PODs
- # -------------------------------
- pod:
- - baremetal:
- <<: *master
-
- # -------------------------------
- # Supported Distros
- # -------------------------------
- distro:
- - 'ubuntu':
- disabled: true
- slave-label: xci-baremetal
- - 'centos':
- disabled: true
- slave-label: xci-baremetal
- - 'opensuse':
- disabled: true
- slave-label: xci-baremetal
-
- # -------------------------------
- # Phases
- # -------------------------------
- phase:
- - 'deploy'
- - 'functest'
- - 'yardstick'
-
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
- - 'xci-{phase}-{pod}-{distro}-daily-{stream}'
-
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'xci-{scenario}-{pod}-{distro}-daily-{stream}'
-
- disabled: '{obj:disabled}'
-
- concurrent: false
-
- properties:
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '^xci-verify.*'
- - '^xci-merge.*'
- - '^xci-os.*'
- - '^xci-k8.*'
- - '^xci-deploy.*'
- - '^xci-functest.*'
- - '^bifrost-.*periodic.*'
- - '^osa-.*periodic.*'
- blocking-level: 'NODE'
- - logrotate-default
-
- triggers:
- - timed: '@midnight'
-
- parameters:
- - string:
- name: DEPLOY_SCENARIO
- default: '{deploy-scenario}'
- - string:
- name: INSTALLER_TYPE
- default: '{installer-type}'
- - string:
- name: XCI_FLAVOR
- default: '{xci-flavor}'
- - label:
- name: SLAVE_LABEL
- default: '{slave-label}'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: XCI_DISTRO
- default: '{distro}'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'smoke'
- - string:
- name: CI_LOOP
- default: 'daily'
- - 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
-
- builders:
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - trigger-builds:
- - project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
- current-parameters: false
- predefined-parameters: |
- DEPLOY_SCENARIO=$DEPLOY_SCENARIO
- INSTALLER_TYPE=$INSTALLER_TYPE
- XCI_FLAVOR=$XCI_FLAVOR
- CI_LOOP=$CI_LOOP
- XCI_DISTRO=$XCI_DISTRO
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- same-node: true
- block: true
- - trigger-builds:
- - project: 'xci-functest-{pod}-{distro}-daily-{stream}'
- current-parameters: false
- predefined-parameters: |
- DEPLOY_SCENARIO=$DEPLOY_SCENARIO
- INSTALLER_TYPE=$INSTALLER_TYPE
- XCI_FLAVOR=$XCI_FLAVOR
- CI_LOOP=$CI_LOOP
- XCI_DISTRO=$XCI_DISTRO
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- same-node: true
- block: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'xci-yardstick-{pod}-{distro}-daily-{stream}'
- current-parameters: false
- predefined-parameters: |
- DEPLOY_SCENARIO=$DEPLOY_SCENARIO
- INSTALLER_TYPE=$INSTALLER_TYPE
- XCI_FLAVOR=$XCI_FLAVOR
- CI_LOOP=$CI_LOOP
- XCI_DISTRO=$XCI_DISTRO
- same-node: true
- block: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
-
- publishers:
- # yamllint disable rule:line-length
- # yamllint enable rule:line-length
- - email-jenkins-admins-on-failure
-
-- job-template:
- name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
-
- disabled: false
-
- concurrent: true
-
- properties:
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '^xci-verify.*'
- - '^xci-merge.*'
- - '^xci-deploy.*'
- - '^xci-functest.*'
- - '^bifrost-.*periodic.*'
- - '^osa-.*periodic.*'
- blocking-level: 'NODE'
- - throttle:
- enabled: true
- max-per-node: 1
- option: 'project'
- - logrotate-default
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{opnfv-releng-version}'
- - string:
- name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-noha'
- - string:
- name: INSTALLER_TYPE
- default: 'osa'
- - string:
- name: XCI_FLAVOR
- default: 'noha'
- - string:
- name: XCI_DISTRO
- default: 'ubuntu'
- - label:
- name: SLAVE_LABEL
- default: '{slave-label}'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'smoke'
- - string:
- name: CI_LOOP
- default: 'daily'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
-
- builders:
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - 'xci-daily-{phase}-macro'
-
-# --------------------------
-# builder macros
-# --------------------------
-# These need to be properly fixed once the basic deployment, functest, and
-# yardstick jobs are working outside of clean vm.
-# One of the ugly fixes is moving test preparation step into the
-# deployment job itself since test 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:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o pipefail
-
- echo "Cleaning the leftovers from the earlier run"
- echo "---------------------------------------------------------------------------------"
- for vm in $(sudo virsh list --all --name | grep -v xci_vm); do
- echo "Removing $vm"
- sudo virsh destroy $vm > /dev/null 2>&1 || true
- sudo virsh undefine $vm > /dev/null 2>&1 || true
- sudo killall -r vbmc > /dev/null 2>&1 || true
- sudo rm -rf /root/.vbmc > /dev/null 2>&1 || true
- done
- echo "---------------------------------------------------------------------------------"
-
- # select the right PDF/IDF
- export PDF=$WORKSPACE/xci/var/${NODE_NAME}-pdf.yml
- export IDF=$WORKSPACE/xci/var/${NODE_NAME}-idf.yml
- if [[ "$NODE_NAME" =~ "virtual" ]]; then
- export PDF=$WORKSPACE/xci/var/pdf.yml
- export IDF=$WORKSPACE/xci/var/idf.yml
- fi
-
- cd $WORKSPACE/xci && ./xci-deploy.sh -p $PDF -i $IDF
-
- echo "Prepare OPNFV VM for Tests"
- echo "---------------------------------------------------------------------------------"
- export XCI_PATH=$WORKSPACE
- export XCI_VENV=${XCI_PATH}/venv
- source $XCI_VENV/bin/activate
- while read var; do
- declare -x "\${var}" 2>/dev/null
- echo $var
- done < ${XCI_PATH}/.cache/xci.env && cd ${XCI_PATH}/xci && \
- ansible-playbook -i playbooks/dynamic_inventory.py playbooks/prepare-tests.yml
- ssh root@192.168.122.2 "/root/prepare-tests.sh"
- echo "---------------------------------------------------------------------------------"
-
-- builder:
- name: 'xci-daily-functest-macro'
- builders:
- - shell: |
- #!/bin/bash
- set -o pipefail
-
- ssh root@192.168.122.2 "/root/run-functest.sh"
- functest_exit=$?
-
- case ${DEPLOY_SCENARIO[0]} in
- os-*)
- FUNCTEST_LOG=/root/functest-results/functest.log
- ;;
- k8-*)
- FUNCTEST_LOG=/root/functest-results/functest-kubernetes.log
- ;;
- *)
- echo "Unable to determine the installer. Exiting!"
- exit $functest_exit
- ;;
- esac
-
- echo "Functest log"
- echo "---------------------------------------------------------------------------------"
- ssh root@192.168.122.2 "cat $FUNCTEST_LOG"
- echo "---------------------------------------------------------------------------------"
- exit ${functest_exit}
-- builder:
- name: 'xci-daily-yardstick-macro'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o pipefail
-
- ssh root@192.168.122.2 "/root/run-yardstick.sh"
diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh
deleted file mode 100755
index 71cf96d8d..000000000
--- a/jjb/xci/xci-deploy.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 Ericsson AB 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
-##############################################################################
-set -o errexit
-set -o nounset
-set -o pipefail
-
-cd $WORKSPACE/xci
-
-# for daily jobs, we want to use working versions
-# for periodic jobs, we will use whatever is set in the job, probably master
-if [[ "$CI_LOOP" == "daily" ]]; then
- # source pinned-vars to get releng version
- source ./config/pinned-versions
-
- # checkout the version
- git checkout -q $OPNFV_RELENG_VERSION
- echo "Info: Using $OPNFV_RELENG_VERSION"
-elif [[ "$CI_LOOP" == "periodic" ]]; then
- echo "Info: Using $OPNFV_RELENG_VERSION"
-fi
-
-# this is just an example to give the idea about what we need to do
-# so ignore this part for the timebeing as we need to adjust xci-deploy.sh
-# to take this into account while deploying anyways
-# clone openstack-ansible
-# stable/ocata already use pinned versions so this is only valid for master
-if [[ "$CI_LOOP" == "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
- cd $WORKSPACE
- # get the url to openstack-ansible git
- source ./config/env-vars
- echo "Info: Capture the ansible role requirement versions before doing anything"
- git clone -q $OPENSTACK_OSA_GIT_URL
- cd openstack-ansible
- cat ansible-role-requirements.yml | while IFS= read -r line
- do
- if [[ $line =~ "src:" ]]; then
- repo_url=$(echo $line | awk {'print $2'})
- repo_sha1=$(git ls-remote $repo_url $OPENSTACK_OSA_VERSION | awk {'print $1'})
- fi
- echo "$line" | sed -e "s|master|$repo_sha1|" >> opnfv-ansible-role-requirements.yml
- done
- echo "Info: SHA1s of ansible role requirements"
- echo "-------------------------------------------------------------------------"
- cat opnfv-ansible-role-requirements.yml
- echo "-------------------------------------------------------------------------"
-fi
-
-# proceed with the deployment
-cd $WORKSPACE/xci
-./xci-deploy.sh
-
-if [[ "$JOB_NAME" =~ "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
- # if we arrived here without failing, it means we have something we can pin
- # this is again here to show the intention
- cd $WORKSPACE/openstack-ansible
- OSA_GIT_SHA1=$(git rev-parse HEAD)
-
- # log some info
- echo -e "\n"
- echo "***********************************************************************"
- echo "* OSA SHA1 TO PIN *"
- echo "* *"
- echo " $OSA_GIT_SHA1"
- echo "* *"
- echo "***********************************************************************"
-fi
-
-echo -e "\n"
diff --git a/jjb/xci/xci-merge-jobs.yaml b/jjb/xci/xci-merge-jobs.yaml
deleted file mode 100644
index 666ca9680..000000000
--- a/jjb/xci/xci-merge-jobs.yaml
+++ /dev/null
@@ -1,492 +0,0 @@
----
-- project:
- name: 'opnfv-xci-merge'
-
- project: releng-xci
- # -------------------------------
- # branches
- # -------------------------------
- stream:
- - master:
- branch: '{stream}'
- disabled: true
- # -------------------------------
- # distros
- # -------------------------------
- distro:
- - ubuntu:
- disabled: true
- kill-phase-on: FAILURE
- abort-all-job: true
- - centos:
- disabled: true
- kill-phase-on: NEVER
- abort-all-job: false
- - opensuse:
- disabled: true
- kill-phase-on: FAILURE
- abort-all-job: true
- # -------------------------------
- # postmerge promotion phases
- # -------------------------------
- phase:
- - 'deploy'
- - 'healthcheck'
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'xci-merge-virtual-{stream}'
- - 'xci-merge-promote-virtual-{stream}'
- - 'xci-merge-{distro}-virtual-{stream}'
- - 'xci-merge-{distro}-{phase}-virtual-{stream}'
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'xci-merge-virtual-{stream}'
-
- project-type: multijob
-
- disabled: '{obj:disabled}'
-
- concurrent: false
-
- properties:
- - logrotate-default
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-gerrit
-
- 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: 'releng-xci'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- disable-strict-forbidden-file-verification: 'false'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'xci/scripts/vm/**'
- - compare-type: ANT
- pattern: 'docs/**'
- - compare-type: ANT
- pattern: 'prototypes/**'
- - compare-type: ANT
- pattern: 'upstream/**'
- - compare-type: ANT
- pattern: 'INFO.yaml'
- - project-compare-type: 'REG_EXP'
- project-pattern: 'sfc|sdnvpn|releng-xci-scenarios'
- 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: $GERRIT_PROJECT
- branch: '{branch}'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: CI_LOOP
- default: 'merge'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'healthcheck'
- - string:
- name: DISTRO
- default: 'all'
- - 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:
- - 'xci-merge-set-scenario-macro'
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - multijob:
- name: deploy and test
- condition: SUCCESSFUL
- projects:
- - name: 'xci-merge-opensuse-virtual-{stream}'
- current-parameters: false
- predefined-parameters: |
- DISTRO=opensuse
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - name: 'xci-merge-ubuntu-virtual-{stream}'
- current-parameters: false
- predefined-parameters: |
- DISTRO=ubuntu
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - name: 'xci-merge-centos-virtual-{stream}'
- current-parameters: false
- predefined-parameters: |
- DISTRO=centos
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: false
- kill-phase-on: NEVER
- abort-all-job: false
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - multijob:
- name: promote
- condition: SUCCESSFUL
- projects:
- - name: 'xci-merge-promote-virtual-{stream}'
- current-parameters: true
- predefined-parameters: |
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: true
- kill-phase-on: NEVER
- abort-all-job: true
-
-- job-template:
- name: 'xci-merge-{distro}-virtual-{stream}'
-
- project-type: multijob
-
- disabled: '{obj:disabled}'
-
- concurrent: false
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - 'xci-verify-{distro}-.*'
- - 'xci-merge-{distro}-.*'
- - 'xci-os.*'
- - 'xci-k8.*'
- - 'openstack-bifrost-verify-{distro}-.*'
- - 'xci-osa-verify-{distro}-.*'
- - 'xci-osa-periodic-{distro}-.*'
- blocking-level: 'NODE'
- - throttle:
- max-per-node: 1
- max-total: 3
- categories:
- - xci-verify-virtual
- option: category
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-gerrit
-
- parameters:
- - project-parameter:
- project: $GERRIT_PROJECT
- branch: '{branch}'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: CI_LOOP
- default: 'merge'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'healthcheck'
- - string:
- name: DISTRO
- default: '{distro}'
- - 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:
- - 'xci-merge-set-scenario-macro'
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - multijob:
- name: deploy
- condition: SUCCESSFUL
- projects:
- - name: 'xci-merge-{distro}-deploy-virtual-{stream}'
- current-parameters: true
- predefined-parameters: |
- DISTRO={distro}
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: true
- kill-phase-on: '{kill-phase-on}'
- abort-all-job: '{abort-all-job}'
- - multijob:
- name: healthcheck
- condition: SUCCESSFUL
- projects:
- - name: 'xci-merge-{distro}-healthcheck-virtual-{stream}'
- current-parameters: true
- predefined-parameters: |
- DISTRO={distro}
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: true
- kill-phase-on: '{kill-phase-on}'
- abort-all-job: '{abort-all-job}'
-
- publishers:
- - postbuildscript:
- builders:
- - role: BOTH
- build-on:
- - ABORTED
- - FAILURE
- - NOT_BUILT
- - SUCCESS
- - UNSTABLE
- build-steps:
- - shell: !include-raw: ./xci-cleanup.sh
- mark-unstable-if-failed: true
-
-- job-template:
- name: 'xci-merge-{distro}-{phase}-virtual-{stream}'
-
- disabled: false
-
- concurrent: false
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '.*-bifrost-verify-.*'
- - '.*-bifrost-periodic-.*'
- - 'osa-verify-.*'
- - 'osa-periodic-.*'
- blocking-level: 'NODE'
-
- parameters:
- - string:
- name: PROJECT
- default: $GERRIT_PROJECT
- - string:
- name: DISTRO
- default: 'ubuntu'
- - string:
- name: CI_LOOP
- default: 'merge'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - 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: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: 'Git URL to use on this Jenkins Slave'
-
- wrappers:
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-gerrit
-
- builders:
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - 'xci-merge-{phase}-macro'
-
-- job-template:
- name: 'xci-merge-promote-virtual-{stream}'
-
- disabled: false
-
- concurrent: false
-
- properties:
- - logrotate-default
-
- parameters:
- - string:
- name: PROJECT
- default: $GERRIT_PROJECT
- - string:
- name: CI_LOOP
- default: 'merge'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'healthcheck'
- - string:
- name: DISTRO
- default: 'all'
- - string:
- name: OPNFV_RELENG_DEV_PATH
- default: $WORKSPACE/
- - string:
- name: LOCAL_PROMOTION_METADATA_FILE
- default: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - string:
- name: REMOTE_PROMOTION_METADATA_FILE
- default: "gs://artifacts.opnfv.org/xci/pipeline/merge/$DEPLOY_SCENARIO.properties"
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: 'Git URL to use on this Jenkins Slave'
-
- wrappers:
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- builders:
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - 'xci-merge-promote-macro'
-
-# -------------------------------
-# builder macros
-# -------------------------------
-- builder:
- name: 'xci-merge-set-scenario-macro'
- builders:
- - shell:
- !include-raw: ./xci-set-scenario.sh
-
-- 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
-
-- 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
deleted file mode 100755
index d8d61bee2..000000000
--- a/jjb/xci/xci-promote.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/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.
-#----------------------------------------------------------------------
-
-# ensure GERRIT_TOPIC is set
-GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
-
-# 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
-
-# fail if promotion metadata file doesn't exist
-if [ ! -f $LOCAL_PROMOTION_METADATA_FILE ]; then
- echo "Unable to find promotion metadata file $LOCAL_PROMOTION_METADATA_FILE"
- echo "Skipping promotion!"
- exit 1
-fi
-
-# put additional info into the metadata file so we can use that for displaying the information
-echo "PROMOTED_BY=$BUILD_URL" >> $LOCAL_PROMOTION_METADATA_FILE
-echo "PROMOTED_ON=$(date -u '+%F_%H:%M'UTC)" >> $LOCAL_PROMOTION_METADATA_FILE
-
-# upload promotion metadata file to OPNFV artifact repo
-echo "Storing promotion metadata as $REMOTE_PROMOTION_METADATA_FILE"
-gsutil cp $LOCAL_PROMOTION_METADATA_FILE $REMOTE_PROMOTION_METADATA_FILE > /dev/null 2>&1
-
-# update the file metadata on gs to prevent the use of cached version of the file
-gsutil -m setmeta -r -h "Content-Type:text/html" \
- -h "Cache-Control:private, max-age=0, no-transform" \
- $REMOTE_PROMOTION_METADATA_FILE > /dev/null 2>&1
-
-# log the metadata to console
-echo "Stored the metadata for $DEPLOY_SCENARIO"
-echo "---------------------------------------------------------------------------------"
-gsutil cat $REMOTE_PROMOTION_METADATA_FILE
-echo "---------------------------------------------------------------------------------"
-echo "Scenario $DEPLOY_SCENARIO has successfully been promoted!"
diff --git a/jjb/xci/xci-rtd-jobs.yaml b/jjb/xci/xci-rtd-jobs.yaml
deleted file mode 100644
index d21aad5a0..000000000
--- a/jjb/xci/xci-rtd-jobs.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-- project:
- name: releng-xci-rtd
- project: releng-xci
- project-name: releng-xci
-
- gerrit-skip-vote: true
- project-pattern: 'releng-xci'
- rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfv-releng-xci/47389/'
- rtd-token: '7dbc774ea9a625296d2e973aff3e79af26b15d4d'
-
- jobs:
- - '{project-name}-rtd-jobs'
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
deleted file mode 100755
index 992194ca3..000000000
--- a/jjb/xci/xci-run-functest.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/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
-##############################################################################
-set -o nounset
-
-#----------------------------------------------------------------------
-# 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.
-#----------------------------------------------------------------------
-
-# ensure GERRIT_TOPIC is set
-GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
-
-# 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
-
-# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
-# the project where the scenario is coming from is cloned and the patch checked out to the
-# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
-# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
-# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
-# out to the WORKSPACE anyways
-if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
- cd $HOME && /bin/rm -rf $WORKSPACE
- git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
- chmod -R go-rwx $WORKSPACE/xci/scripts/vm
-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
-
-# set XCI_VENV for ansible
-export XCI_PATH=/home/devuser/releng-xci
-export XCI_VENV=${XCI_PATH}/venv
-
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; \
- while read var; do declare -x \"\${var}\" 2>/dev/null; done < ${XCI_PATH}/.cache/xci.env && \
- cd releng-xci/xci && ansible-playbook -i playbooks/dynamic_inventory.py playbooks/prepare-tests.yml"
-echo "Prepare OPNFV VM for Tests"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/prepare-tests.sh"
-echo "Running Functest"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh"
-# Record exit code
-functest_exit=$?
-
-case ${DEPLOY_SCENARIO[0]} in
- os-*)
- FUNCTEST_LOG=/root/functest-results/functest.log
- ;;
- k8-*)
- FUNCTEST_LOG=/root/functest-results/functest-kubernetes.log
- ;;
- *)
- echo "Unable to determine the installer. Exiting!"
- exit 1
- ;;
-esac
-
-echo "Functest log"
-echo "---------------------------------------------------------------------------------"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat $FUNCTEST_LOG"
-echo "---------------------------------------------------------------------------------"
-exit ${functest_exit}
diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh
deleted file mode 100755
index ccea16f87..000000000
--- a/jjb/xci/xci-set-scenario.sh
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/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
-##############################################################################
-set -o pipefail
-set -x
-
-#----------------------------------------------------------------------
-# 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.
-#----------------------------------------------------------------------
-
-# This function allows developers to specify the impacted scenario by adding
-# the info about installer and scenario into the commit message or using
-# the topic branch names. This results in either skipping the real verification
-# totally or skipping the determining the installer and scenario programmatically.
-# It is important to note that this feature is only available to generic scenarios
-# and only single installer/scenario pair is allowed.
-# The input in commit message should be placed at the end of the commit message body,
-# before the signed-off and change-id lines.
-#
-# Pattern to be searched in Commit Message
-# deploy-scenario:<scenario-name>
-# installer-type:<installer-type>
-# Examples:
-# deploy-scenario:os-odl-nofeature
-# installer-type:osa
-#
-# deploy-scenario:k8-nosdn-nofeature
-# installer-type:kubespray
-#
-# Patterns to be searched in topic branch name
-# skip-verify
-# skip-deployment
-# force-verify
-function override_scenario() {
- echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-
- # ensure the metadata we record is consistent for all types of patches including skipped ones
- # extract releng-xci sha
- XCI_SHA=$(cd $WORKSPACE && git rev-parse HEAD)
-
- # extract scenario sha which is same as releng-xci sha for generic scenarios
- SCENARIO_SHA=$XCI_SHA
-
- # process topic branch names
- if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment|force-verify ]]; then
- [[ "$GERRIT_TOPIC" =~ force-verify ]] && echo "Forcing CI verification using default scenario and installer!"
- [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]] && echo "Skipping verification!"
- echo "INSTALLER_TYPE=osa" >> $WORK_DIRECTORY/scenario.properties
- echo "DEPLOY_SCENARIO=os-nosdn-nofeature" >> $WORK_DIRECTORY/scenario.properties
- echo "XCI_SHA=$XCI_SHA" >> $WORK_DIRECTORY/scenario.properties
- echo "SCENARIO_SHA=$SCENARIO_SHA" >> $WORK_DIRECTORY/scenario.properties
- echo "PROJECT_NAME=$GERRIT_PROJECT" >> $WORK_DIRECTORY/scenario.properties
- log_scenario_properties
- exit 0
- fi
-
- # process commit message
- if [[ "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "installer-type:" && "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "deploy-scenario:" ]]; then
- INSTALLER_TYPE=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | awk '/installer-type:/' RS=" " | cut -d":" -f2)
- DEPLOY_SCENARIO=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | awk '/deploy-scenario:/' RS=" " | cut -d":" -f2)
-
- if [[ -z "$INSTALLER_TYPE" || -z "$DEPLOY_SCENARIO" ]]; then
- echo "Installer type or deploy scenario is not specified. Falling back to programmatically determining them."
- else
- echo "Recording the installer '$INSTALLER_TYPE' and scenario '$DEPLOY_SCENARIO' for downstream jobs"
- echo "INSTALLER_TYPE=$INSTALLER_TYPE" >> $WORK_DIRECTORY/scenario.properties
- echo "DEPLOY_SCENARIO=$DEPLOY_SCENARIO" >> $WORK_DIRECTORY/scenario.properties
- echo "XCI_SHA=$XCI_SHA" >> $WORK_DIRECTORY/scenario.properties
- echo "SCENARIO_SHA=$SCENARIO_SHA" >> $WORK_DIRECTORY/scenario.properties
- echo "PROJECT_NAME=$GERRIT_PROJECT" >> $WORK_DIRECTORY/scenario.properties
- log_scenario_properties
- exit 0
- fi
- else
- echo "Installer type or deploy scenario is not specified. Falling back to programmatically determining them."
- fi
-}
-
-# This function determines the default scenario for changes coming to releng-xci
-# by processing the Gerrit change and using diff to see what changed.
-#
-# The stuff in releng-xci is for the installer and other common things so the
-# determination is based on those.
-#
-# Pattern
-# releng-xci/installer/<installer_type>/<impacted files>: <scenario>
-function determine_default_scenario() {
- echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-
- # get the changeset
- cd $WORKSPACE
- # We need to set default scenario for changes that mess with installers
- INSTALLERS=$(git diff HEAD^..HEAD --name-only -- 'xci/installer' | cut -d "/" -f 3 | uniq)
- for CHANGED_INSTALLER in $INSTALLERS; do
- case $CHANGED_INSTALLER in
- kubespray)
- DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='k8-nosdn-nofeature'
- ;;
- # Default case (including OSA changes)
- *)
- DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
- ;;
- esac
- done
- # For all other changes, we only need to set a default scenario if it's not set already
- if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer'; then
- [[ ${#DEPLOY_SCENARIO[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
- fi
-
- # extract releng-xci sha
- XCI_SHA=$(cd $WORKSPACE && git rev-parse HEAD)
-
- # TODO: we need to fix this so we actually extract the scenario sha by cloning releng-xci-scenarios
- # for the determined scenario. it is crucial for promotion...
- SCENARIO_SHA=$XCI_SHA
-}
-
-# This function determines the impacted scenario by processing the Gerrit
-# change and using diff to see what changed. If changed files belong to a scenario
-# its name gets recorded for deploying and testing the right scenario.
-#
-# Pattern
-# <project-repo>/scenarios/<scenario>/<impacted files>: <scenario>
-function determine_scenario() {
- echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-
- # remove the clone that is done via jenkins and place releng-xci there so the
- # things continue functioning properly
- cd $HOME && /bin/rm -rf $WORKSPACE
- git clone -q https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
-
- # fix the permissions so ssh doesn't complain due to having world-readable keyfiles
- chmod -R go-rwx $WORKSPACE/xci/scripts/vm
-
- # clone the project repo and fetch the patchset to process for further processing
- git clone -q https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $WORK_DIRECTORY/$GERRIT_PROJECT
- cd $WORK_DIRECTORY/$GERRIT_PROJECT
- git fetch -q https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout -q FETCH_HEAD
-
- # process the diff to find out what scenario(s) are impacted - there should only be 1
- DEPLOY_SCENARIO+=$(git diff HEAD^..HEAD --name-only | grep scenarios | awk -F '[/|/]' '{print $2}' | uniq)
-
- # extract releng-xci sha
- XCI_SHA=$(cd $WORKSPACE && git rev-parse HEAD)
-
- # extract scenario sha
- SCENARIO_SHA=$(cd $WORK_DIRECTORY/$GERRIT_PROJECT && git rev-parse HEAD)
-}
-
-# This function allows developers to specify the specific XCI flavor for the
-# impacted scenario by adding the XCI Flavor info about the specific scenario.
-# This results in either skipping the real verification
-# totally or skipping the determining the installer and scenario programmatically.
-# It is important to note that this feature is only available to generic scenarios
-# and only single installer/scenario pair is allowed.
-# The input in commit message should be placed at the end of the commit message body,
-# before the signed-off and change-id lines.
-#
-# Pattern to be searched in Commit Message
-# xci-flavor:<xci-flavor>
-# Examples:
-# xci-flavor:noha
-function override_xci_flavor() {
- echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-
- # process commit message for XCI Flavor
- if [[ "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "xci-flavor:" ]]; then
- XCI_FLAVOR=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | awk '/xci-flavor:/' RS=" " | cut -d":" -f2)
-
- if [[ -z "$XCI_FLAVOR" ]]; then
- XCI_FLAVOR='mini'
- echo "XCI flavor is not specified. The default is specified instead (i.e. mini). Falling back to programmatically determining them."
- echo "XCI_FLAVOR=mini" >> $WORK_DIRECTORY/scenario.properties
- else
- echo "Recording the XCI flavor '$XCI_FLAVOR' for downstream jobs"
- echo "XCI_FLAVOR=$XCI_FLAVOR" >> $WORK_DIRECTORY/scenario.properties
- fi
- else
- XCI_FLAVOR='mini'
- echo "XCI flavor is not specified. The default is specified instead (i.e. mini). Falling back to programmatically determining them."
- echo "XCI_FLAVOR=mini" >> $WORK_DIRECTORY/scenario.properties
- fi
-
-}
-
-function log_scenario_properties() {
- echo "Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
- echo "-------------------------------------------------------------------------"
- cat $WORK_DIRECTORY/scenario.properties
- echo "-------------------------------------------------------------------------"
-}
-
-echo "Determining the impacted scenario"
-
-declare -a DEPLOY_SCENARIO
-
-# ensure GERRIT_TOPIC is set
-GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
-
-# this directory is where the temporary clones and files are created
-# while extracting the impacted scenario
-WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO
-/bin/rm -rf $WORK_DIRECTORY && mkdir -p $WORK_DIRECTORY
-
-if [[ $GERRIT_PROJECT == "releng-xci" ]]; then
- determine_default_scenario
-else
- determine_scenario
-fi
-override_xci_flavor
-override_scenario
-
-# ensure single scenario is impacted
- if [[ $(IFS=$'\n' echo ${DEPLOY_SCENARIO[@]} | wc -w) != 1 ]]; then
- echo "Change impacts multiple scenarios!"
- echo "XCI doesn't support testing of changes that impact multiple scenarios currently."
- echo "Please split your change into multiple different/dependent changes, each modifying single scenario."
- exit 1
-fi
-
-# set the installer
-case ${DEPLOY_SCENARIO[0]} in
- os-*)
- INSTALLER_TYPE=osa
- ;;
- k8-*)
- INSTALLER_TYPE=kubespray
- ;;
- *)
- echo "Unable to determine the installer. Exiting!"
- exit 1
- ;;
-esac
-
-# save the installer and scenario names into java properties file
-# so they can be injected to downstream jobs via envInject
-echo "Recording the installer '$INSTALLER_TYPE' and scenario '${DEPLOY_SCENARIO[0]}' and SHAs for downstream jobs"
-echo "INSTALLER_TYPE=$INSTALLER_TYPE" >> $WORK_DIRECTORY/scenario.properties
-echo "DEPLOY_SCENARIO=$DEPLOY_SCENARIO" >> $WORK_DIRECTORY/scenario.properties
-echo "XCI_SHA=$XCI_SHA" >> $WORK_DIRECTORY/scenario.properties
-echo "SCENARIO_SHA=$SCENARIO_SHA" >> $WORK_DIRECTORY/scenario.properties
-echo "PROJECT_NAME=$GERRIT_PROJECT" >> $WORK_DIRECTORY/scenario.properties
-
-# log scenario.properties to console to ease the troubleshooting when needed
-log_scenario_properties
-
-# skip scenario support check if the job is promotion job
-if [[ "$JOB_NAME" =~ (os|k8) ]]; then
- 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[0]}$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
- echo "# SKIPPED: Scenario ${DEPLOY_SCENARIO[0]} is NOT supported on $DISTRO"
- exit 0
-fi
diff --git a/jjb/xci/xci-start-deployment.sh b/jjb/xci/xci-start-deployment.sh
deleted file mode 100755
index 102ca41c3..000000000
--- a/jjb/xci/xci-start-deployment.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/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.
-#----------------------------------------------------------------------
-
-# ensure GERRIT_TOPIC is set
-GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
-
-# 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
-
-# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
-# the project where the scenario is coming from is cloned and the patch checked out to the
-# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
-# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
-# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
-# out to the WORKSPACE anyways
-if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
- cd $HOME && /bin/rm -rf $WORKSPACE
- git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
- chmod -R go-rwx $WORKSPACE/xci/scripts/vm
-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/${DISTRO}-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
deleted file mode 100755
index 79b6a785a..000000000
--- a/jjb/xci/xci-start-new-vm.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/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.
-#----------------------------------------------------------------------
-
-# ensure GERRIT_TOPIC is set
-GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
-
-# skip the deployment if the patch doesn't impact the deployment
-if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
- echo "Skipping the deployment!"
- exit 0
-fi
-
-# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
-# the project where the scenario is coming from is cloned and the patch checked out to the
-# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
-# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
-# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
-# out to the WORKSPACE anyways
-if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
- cd $HOME && /bin/rm -rf $WORKSPACE
- git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
- chmod -R go-rwx $WORKSPACE/xci/scripts/vm
-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
-set -o pipefail
-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 CORE_OPENSTACK_INSTALL=true
-export BIFROST_USE_PREBUILT_IMAGES=true
-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
-export CI_LOOP=$CI_LOOP
-export BUILD_TAG=$BUILD_TAG
-export NODE_NAME=$NODE_NAME
-
-if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
- export XCI_ANSIBLE_PARAMS="-e @/home/devuser/releng-xci/scenario_overrides.yml"
-fi
-
-cd xci
-./xci-deploy.sh | ts
-EOF
-
-if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
- cat > scenario_overrides.yml <<-EOF
----
-xci_scenarios_overrides:
- - scenario: $DEPLOY_SCENARIO
- version: $GERRIT_PATCHSET_REVISION
- refspec: $GERRIT_REFSPEC
-EOF
-fi
-
-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.yaml b/jjb/xci/xci-verify-jobs.yaml
deleted file mode 100644
index 799ef6e96..000000000
--- a/jjb/xci/xci-verify-jobs.yaml
+++ /dev/null
@@ -1,327 +0,0 @@
----
-- project:
- name: 'opnfv-xci-verify'
-
- project: releng-xci
- # -------------------------------
- # branches
- # -------------------------------
- stream:
- - master:
- branch: '{stream}'
- # -------------------------------
- # distros
- # -------------------------------
- distro:
- - ubuntu:
- disabled: false
- successful: false
- failed: false
- unstable: false
- notbuilt: false
- - centos:
- disabled: true
- successful: true
- failed: true
- unstable: true
- notbuilt: true
- - opensuse:
- disabled: false
- successful: true
- failed: true
- unstable: true
- notbuilt: true
- # -------------------------------
- # type
- # -------------------------------
- type:
- - virtual
- # -------------------------------
- # patch verification phases
- # -------------------------------
- phase:
- - 'deploy'
- - 'healthcheck'
- # -------------------------------
- # jobs
- # -------------------------------
- jobs:
- - 'xci-verify-{distro}-{type}-{stream}'
- - 'xci-verify-{distro}-{phase}-{type}-{stream}'
-# -------------------------------
-# job templates
-# -------------------------------
-- job-template:
- name: 'xci-verify-{distro}-{type}-{stream}'
-
- project-type: multijob
-
- disabled: '{obj:disabled}'
-
- concurrent: true
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - 'xci-verify-{distro}-.*'
- - 'xci-merge-{distro}-.*'
- - 'xci-os-.*'
- - 'xci-k8-.*'
- - 'openstack-bifrost-verify-{distro}-.*'
- - 'xci-osa-verify-{distro}-.*'
- - 'xci-osa-periodic-{distro}-.*'
- blocking-level: 'NODE'
- - throttle:
- max-per-node: 2
- max-total: 10
- categories:
- - xci-verify-virtual
- option: category
-
- wrappers:
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-gerrit
-
- triggers:
- - gerrit:
- server-name: 'gerrit.opnfv.org'
- trigger-on:
- - patchset-created-event:
- exclude-drafts: 'false'
- exclude-trivial-rebase: 'false'
- exclude-no-code-change: 'true'
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: 'recheck'
- - comment-added-contains-event:
- comment-contains-value: 'reverify'
- projects:
- - project-compare-type: 'ANT'
- project-pattern: 'releng-xci'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- disable-strict-forbidden-file-verification: 'false'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'xci/scripts/vm/**'
- - compare-type: ANT
- pattern: 'docs/**'
- - compare-type: ANT
- pattern: 'upstream/**'
- - project-compare-type: 'REG_EXP'
- project-pattern: 'sfc|sdnvpn|releng-xci-scenarios'
- 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'
- skip-vote:
- successful: '{obj:successful}'
- failed: '{obj:failed}'
- unstable: '{obj:unstable}'
- notbuilt: '{obj:notbuilt}'
-
- parameters:
- - project-parameter:
- project: $GERRIT_PROJECT
- branch: '{branch}'
- - label:
- name: SLAVE_LABEL
- default: 'xci-virtual'
- all-nodes: false
- node-eligibility: 'ignore-offline'
- - string:
- name: DISTRO
- default: '{distro}'
- - string:
- name: CLEAN_DIB_IMAGES
- default: 'true'
- - string:
- name: CI_LOOP
- default: 'verify'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - string:
- name: FUNCTEST_MODE
- default: 'tier'
- - string:
- name: FUNCTEST_SUITE_NAME
- default: 'healthcheck'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: 'Git URL to use on this Jenkins Slave'
-
- builders:
- - 'xci-verify-clean-vm-macro'
- - 'xci-verify-set-scenario-macro'
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - multijob:
- name: deploy
- condition: SUCCESSFUL
- projects:
- - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
- current-parameters: true
- predefined-parameters: |
- DISTRO={distro}
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: true
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
- name: healthcheck
- condition: SUCCESSFUL
- projects:
- - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
- current-parameters: true
- predefined-parameters: |
- DISTRO={distro}
- CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
- GERRIT_PROJECT=$GERRIT_PROJECT
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- CI_LOOP=$CI_LOOP
- FUNCTEST_VERSION=$FUNCTEST_VERSION
- FUNCTEST_MODE=$FUNCTEST_MODE
- FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
- node-parameters: true
- kill-phase-on: NEVER
- abort-all-job: true
-
- publishers:
- - postbuildscript:
- builders:
- - role: BOTH
- build-on:
- - ABORTED
- - NOT_BUILT
- - SUCCESS
- - UNSTABLE
- build-steps:
- - shell: !include-raw: ./xci-cleanup.sh
- mark-unstable-if-failed: true
-
-
-- job-template:
- name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
-
- disabled: false
-
- concurrent: true
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '.*-bifrost-verify-.*'
- - '.*-bifrost-periodic-.*'
- - 'osa-verify-.*'
- - 'osa-periodic-.*'
- blocking-level: 'NODE'
-
- parameters:
- - string:
- name: PROJECT
- default: $GERRIT_PROJECT
- - string:
- name: DISTRO
- default: 'ubuntu'
- - string:
- name: CI_LOOP
- default: 'verify'
- - string:
- name: FUNCTEST_VERSION
- default: 'hunter'
- - 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: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: 'Git URL to use on this Jenkins Slave'
-
- wrappers:
- - inject:
- properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
- - ssh-agent-wrapper
- - build-timeout:
- timeout: 240
- - fix-workspace-permissions
-
- scm:
- - git-scm-gerrit
-
- builders:
- - description-setter:
- description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
- - 'xci-verify-{phase}-macro'
-
-# -------------------------------
-# builder macros
-# -------------------------------
-- builder:
- name: 'xci-verify-clean-vm-macro'
- builders:
- - shell:
- !include-raw: ./xci-cleanup.sh
-
-- builder:
- name: 'xci-verify-set-scenario-macro'
- builders:
- - shell:
- !include-raw: ./xci-set-scenario.sh
-
-- builder:
- name: 'xci-verify-deploy-macro'
- builders:
- - shell:
- !include-raw: ./xci-start-new-vm.sh
-
- - shell:
- !include-raw: ./xci-start-deployment.sh
-
-- builder:
- name: 'xci-verify-healthcheck-macro'
- builders:
- - shell:
- !include-raw: ./xci-run-functest.sh
diff --git a/jjb/xci/xci-views.yaml b/jjb/xci/xci-views.yaml
deleted file mode 100644
index ee1e53a59..000000000
--- a/jjb/xci/xci-views.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- project:
- name: xci-view
- views:
- - project-view
- project-name: xci