Serena Feng (ZTE, feng.xiaowei@zte.com.cn)
Yolanda Robla Mota (Red Hat, yroblamo@redhat.com)
Markos Chandras (SUSE, mchandras@suse.de)
+Luke Hinds (Red Hat, lhinds@redhat.com)
Link to TSC approval of the project: http://ircbot.wl.linuxfoundation.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-14-14.00.html
Link to TSC voting for removal of Victor Laza as committer: http://meetbot.opnfv.org/meetings/opnfv-meeting/2016/opnfv-meeting.2016-02-16-14.59.html
[[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
# set OPNFV_ARTIFACT_VERSION
if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then
- export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER}
+ export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}"
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY"
elif echo $BUILD_TAG | grep "csit" 1> /dev/null; then
export OPNFV_ARTIFACT_VERSION=csit${BUILD_NUMBER}
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso"
fi
+# Temporary hack until we fix apex build script
+BUILD_DIRECTORY=${WORKSPACE}/build
+
# start the build
cd $WORKSPACE/ci
./build.sh $BUILD_ARGS
IPV6_FLAG=False
# log info to console
-echo "Starting the Apex virtual deployment."
+echo "Starting the Apex deployment."
echo "--------------------------------------------------------"
echo
-if ! rpm -q wget > /dev/null; then
- sudo yum -y install wget
-fi
-
-if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
- # Build is from a verify, use local build artifacts (not RPMs)
- cd $WORKSPACE/../${BUILD_DIRECTORY}
- WORKSPACE=$(pwd)
- echo "WORKSPACE modified to $WORKSPACE"
- cd $WORKSPACE/ci
-elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
- # if artifact name is passed the pull a
- # specific artifact from artifacts.opnfv.org
- # artifact specified should be opnfv-apex-<version>.noarch.rpm
- RPM_INSTALL_PATH=$GS_URL
- RPM_LIST=$RPM_INSTALL_PATH/$ARTIFACT_NAME
-else
- # Use latest RPMS
- if [[ $BUILD_DIRECTORY == *apex-build* ]]; then
- # Triggered from a daily so RPMS should be in local directory
- BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
- echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
-
- if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then
- # if opnfv.properties exists then use the
- # local build. Source the file so we get local OPNFV vars
- source ${BUILD_DIRECTORY}/../opnfv.properties
- RPM_INSTALL_PATH=${BUILD_DIRECTORY}/noarch
- RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
- else
- echo "BUILD_DIRECTORY is from a daily job, so will not use latest from URL"
- echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY"
- exit 1
- fi
- else
- # use the latest from artifacts.opnfv.org
- # get the latest.properties to get the link to the latest artifact
- if ! wget -O $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties; then
- echo "ERROR: Unable to find latest.properties at ${GS_URL}...exiting"
- exit 1
- fi
- # source the file so we get OPNFV vars
- source opnfv.properties
- RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//')
- RPM_LIST=${RPM_INSTALL_PATH}/$(basename $OPNFV_RPM_URL)
- fi
-fi
-
-# rename odl_l3 to odl only for master
-# this can be removed once all the odl_l3 references
-# are updated to odl after the danube jobs are removed
-if [[ "$BUILD_DIRECTORY" == *master* ]]; then
- DEPLOY_SCENARIO=${DEPLOY_SCENARIO/odl_l3/odl}
-fi
if [ -z "$DEPLOY_SCENARIO" ]; then
echo "Deploy scenario not set!"
exit 1
fi
fi
-# use local build for verify and promote
-if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
- if [ ! -e "${WORKSPACE}/build/lib" ]; then
- ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib
- fi
- DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy"
- NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network"
- DEPLOY_CMD="$(pwd)/deploy.sh"
- IMAGES="${WORKSPACE}/.build/"
- BASE="${WORKSPACE}/build"
- LIB="${WORKSPACE}/lib"
- # Make sure python34 deps are installed
- for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do
- if ! rpm -q ${dep_pkg} > /dev/null; then
- if ! sudo yum install -y ${dep_pkg}; then
- echo "Failed to install ${dep_pkg}"
- exit 1
- fi
- fi
- done
-
- # Make sure jinja2 is installed
- for python_pkg in jinja2; do
- if ! python3.4 -c "import $python_pkg"; then
- echo "$python_pkg package not found for python3.4, attempting to install..."
- if ! sudo easy_install-3.4 $python_pkg; then
- echo -e "Failed to install $python_pkg package for python3.4"
- exit 1
- fi
- fi
- done
-
- # Make sure ipxe-roms-qemu package is updated to latest.
- # This package is needed for multi virtio nic PXE boot in virtual environment.
- sudo yum update -y ipxe-roms-qemu
-
- if [ -z ${PYTHONPATH:-} ]; then
- export PYTHONPATH=${WORKSPACE}/lib/python
- else
- export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python
- fi
-# use RPMs
+# Dev or RPM/ISO build
+if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
+ # Settings for deploying from git workspace
+ DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy"
+ NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network"
+ DEPLOY_CMD="${WORKSPACE}/ci/deploy.sh"
+ RESOURCES="${WORKSPACE}/.build/"
+ CONFIG="${WORKSPACE}/build"
+ LIB="${WORKSPACE}/lib"
+
+ # Ensure artifacts were downloaded and extracted correctly
+ # TODO(trozet) add verification here
+
else
- # find version of RPM
- VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)')
- # build RPM List which already includes base Apex RPM
- for pkg in ${APEX_PKGS}; do
- RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm"
- done
-
- # remove old / install new RPMs
- if rpm -q opnfv-apex > /dev/null; then
- INSTALLED_RPMS=$(rpm -qa | grep apex)
- if [ -n "$INSTALLED_RPMS" ]; then
- sudo yum remove -y ${INSTALLED_RPMS}
- fi
- fi
+ DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/"
+ NETWORK_SETTINGS_DIR="/etc/opnfv-apex/"
+ DEPLOY_CMD="opnfv-deploy"
+ RESOURCES="/var/opt/opnfv/images"
+ CONFIG="/var/opt/opnfv"
+ LIB="/var/opt/opnfv/lib"
+
+fi
- if ! sudo yum install -y $RPM_LIST; then
- echo "Unable to install new RPMs: $RPM_LIST"
+# Install Dependencies
+# Make sure python34 dependencies are installed
+for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do
+ if ! rpm -q ${dep_pkg} > /dev/null; then
+ if ! sudo yum install -y ${dep_pkg}; then
+ echo "Failed to install ${dep_pkg}"
exit 1
fi
-
- DEPLOY_CMD=opnfv-deploy
- DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/"
- NETWORK_SETTINGS_DIR="/etc/opnfv-apex/"
- IMAGES="/var/opt/opnfv/images"
- BASE="/var/opt/opnfv"
- LIB="/var/opt/opnfv/lib"
+ fi
+done
+
+# Make sure jinja2 is installed
+for python_pkg in jinja2; do
+ if ! python3.4 -c "import $python_pkg"; then
+ echo "$python_pkg package not found for python3.4, attempting to install..."
+ if ! sudo easy_install-3.4 $python_pkg; then
+ echo -e "Failed to install $python_pkg package for python3.4"
+ exit 1
+ fi
+ fi
+done
+
+if [[ "$JOB_NAME" =~ "virtual" ]]; then
+ # Make sure ipxe-roms-qemu package is updated to latest.
+ # This package is needed for multi virtio nic PXE boot in virtual environment.
+ sudo yum update -y ipxe-roms-qemu
+ if [ -z ${PYTHONPATH:-} ]; then
+ export PYTHONPATH=${WORKSPACE}/lib/python
+ else
+ export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python
+ fi
fi
# set env vars to deploy cmd
else
clean_opts=''
fi
- if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
- sudo BASE=${BASE} LIB=${LIB} ./clean.sh ${clean_opts}
+
+ if [[ "$ARTIFACT_VERSION" =~ "dev" ]]; then
+ sudo CONFIG=${CONFIG} LIB=${LIB} ./clean.sh ${clean_opts}
else
sudo BASE=${BASE} LIB=${LIB} opnfv-clean ${clean_opts}
fi
echo "ERROR: Required settings file missing: Deploy settings file ${DEPLOY_FILE}"
fi
-if [[ "$JOB_NAME" == *virtual* ]]; then
+if [[ "$JOB_NAME" =~ "virtual" ]]; then
# settings for virtual deployment
DEPLOY_CMD="${DEPLOY_CMD} -v"
if [[ "${DEPLOY_SCENARIO}" =~ fdio|ovs ]]; then
NETWORK_SETTINGS_DIR="/root/network"
INVENTORY_FILE="/root/inventory/pod_settings.yaml"
-# (trozet) According to FDS folks uio_pci_generic works with UCS-B
-# and there appears to be a bug with vfio-pci
- # if fdio on baremetal, then we are using UCS enic and
- # need to use vfio-pci instead of uio generic
-# if [[ "$DEPLOY_SCENARIO" == *fdio* ]]; then
-# TMP_DEPLOY_FILE="${WORKSPACE}/${DEPLOY_SCENARIO}.yaml"
-# cp -f ${DEPLOY_FILE} ${TMP_DEPLOY_FILE}
-# sed -i 's/^\(\s*uio-driver:\).*$/\1 vfio-pci/g' ${TMP_DEPLOY_FILE}
-# DEPLOY_FILE=${TMP_DEPLOY_FILE}
-# fi
-
if ! sudo test -e "$INVENTORY_FILE"; then
echo "ERROR: Required settings file missing: Inventory settings file ${INVENTORY_FILE}"
exit 1
--- /dev/null
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+APEX_PKGS="common undercloud" # removed onos for danube
+
+[[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
+
+if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
+ # dev build
+ export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}"
+ # get build artifact
+ pushd ${BUILD_DIRECTORY} > /dev/null
+ echo "Downloading packaged dev build..."
+ curl --fail -s -o $BUILD_DIRECTORY/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz http://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz
+ tar -xvf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz
+ popd > /dev/null
+else
+ # Must be RPMs/ISO
+ export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
+
+ # get the properties file in order to get info regarding artifacts
+ curl --fail -s -o $BUILD_DIRECTORY/opnfv.properties http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties
+
+ # source the file so we get OPNFV vars
+ source $BUILD_DIRECTORY/opnfv.properties
+
+ RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//')
+ RPM_LIST=${RPM_INSTALL_PATH}/$(basename $OPNFV_RPM_URL)
+
+ # find version of RPM
+ VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)')
+ # build RPM List which already includes base Apex RPM
+ for pkg in ${APEX_PKGS}; do
+ RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm"
+ done
+
+ # remove old / install new RPMs
+ if rpm -q opnfv-apex > /dev/null; then
+ INSTALLED_RPMS=$(rpm -qa | grep apex)
+ if [ -n "$INSTALLED_RPMS" ]; then
+ sudo yum remove -y ${INSTALLED_RPMS}
+ fi
+ fi
+ if ! sudo yum install -y $RPM_LIST; then
+ echo "Unable to install new RPMs: $RPM_LIST"
+ exit 1
+ fi
+
+ # log info to console
+ echo "Downloading the ISO artifact using URL http://$OPNFV_ARTIFACT_URL"
+ echo "--------------------------------------------------------"
+ echo
+
+ # Download ISO
+ curl --fail -s -o $BUILD_DIRECTORY/apex.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
+
+fi
+
+# TODO: Uncomment these lines to verify SHA512SUMs once the sums are
+# fixed.
+# echo "$OPNFV_ARTIFACT_SHA512SUM $BUILD_DIRECTORY/apex.iso" | sha512sum -c
+# echo "$OPNFV_RPM_SHA512SUM $BUILD_DIRECTORY/$(basename $OPNFV_RPM_URL)" | sha512sum -c
+
+# list the files
+ls -al $BUILD_DIRECTORY
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
--- /dev/null
+##############################################################################
+# Copyright (c) 2016 Tim Rozet (trozet@redhat.com) 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
+##############################################################################
+
+import pprint
+import yaml
+from jinja2 import Environment
+from jinja2 import FileSystemLoader
+
+gspathname = dict()
+branch = dict()
+build_slave = dict()
+env = Environment(loader=FileSystemLoader('./'), autoescape=True)
+
+with open('scenarios.yaml.hidden') as _:
+ scenarios = yaml.safe_load(_)
+
+template = env.get_template('apex.yml.j2')
+
+print("Scenarios are: ")
+pprint.pprint(scenarios)
+
+for stream in scenarios:
+ if stream == 'master':
+ gspathname['master'] = ''
+ branch[stream] = stream
+ else:
+ gspathname[stream] = '/' + stream
+ branch[stream] = 'stable/' + stream
+ build_slave[stream] = 'apex-baremetal-{}'.format(stream)
+
+output = template.render(scenarios=scenarios, gspathname=gspathname,
+ branch=branch, build_slave=build_slave)
+
+with open('./apex.yml', 'w') as fh:
+ fh.write(output)
BUILD_DIRECTORY=${WORKSPACE}/.build
-# clone releng repository
-echo "Cloning releng repository..."
-[ -d releng ] && rm -rf releng
-git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
-#this is where we import the siging key
-if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
- source $WORKSPACE/releng/utils/gpg_import_key.sh
-fi
+importkey () {
+ # clone releng repository
+ echo "Cloning releng repository..."
+ [ -d releng ] && rm -rf releng
+ git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
+ #this is where we import the siging key
+ if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
+ source $WORKSPACE/releng/utils/gpg_import_key.sh
+ fi
+}
signrpm () {
-for artifact in $RPM_LIST $SRPM_LIST; do
- echo "Signing artifact: ${artifact}"
- gpg2 -vvv --batch --yes --no-tty \
- --default-key opnfv-helpdesk@rt.linuxfoundation.org \
- --passphrase besteffort \
- --detach-sig $artifact
- gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig)
- echo "Upload complete for ${artifact} signature"
-done
+ for artifact in $RPM_LIST $SRPM_LIST; do
+ echo "Signing artifact: ${artifact}"
+ gpg2 -vvv --batch --yes --no-tty \
+ --default-key opnfv-helpdesk@rt.linuxfoundation.org \
+ --passphrase besteffort \
+ --detach-sig $artifact
+ gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig)
+ echo "Upload complete for ${artifact} signature"
+ done
}
signiso () {
-time gpg2 -vvv --batch --yes --no-tty \
- --default-key opnfv-helpdesk@rt.linuxfoundation.org \
- --passphrase besteffort \
- --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso
+ gpg2 -vvv --batch --yes --no-tty \
+ --default-key opnfv-helpdesk@rt.linuxfoundation.org \
+ --passphrase besteffort \
+ --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso
-gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig
-echo "ISO signature Upload Complete!"
+ gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig
+ echo "ISO signature Upload Complete!"
}
uploadiso () {
done
gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log
gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log
+
+ # Make the property files viewable on the artifact site
+ gsutil -m setmeta \
+ -h "Content-Type:text/html" \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ gs://$GS_URL/latest.properties \
+ gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1
}
uploadsnap () {
echo "Upload complete for Snapshot"
}
+uploadimages () {
+ # Uploads dev tarball
+ export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}"
+ echo "Uploading development build tarball"
+ pushd $BUILD_DIRECTORY > /dev/null
+ tar czf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz *.qcow2
+ gsutil cp apex-${OPNFV_ARTIFACT_VERSION}.tar.gz gs://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz > gsutil.latest.log
+ popd > /dev/null
+}
+
+# Always import the signing key, if it's available the artifacts will be
+# signed before being uploaded
+importkey
+
if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
echo "Signing Key avaliable"
SIGN_ARTIFACT="true"
if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then
uploadsnap
elif [ "$ARTIFACT_TYPE" == 'iso' ]; then
+ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
+ echo "Skipping artifact upload for ${ARTIFACT_TYPE} due to dev build"
+ exit 0
+ fi
if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then
signiso
fi
uploadiso
elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then
- RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch
- RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
- VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//')
- for pkg in common undercloud; do # removed onos for danube
- RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
- done
- SRPM_INSTALL_PATH=$BUILD_DIRECTORY
- SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL)
- VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//')
- for pkg in common undercloud; do # removed onos for danube
- SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
- done
+ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
+ echo "dev build detected, will upload image tarball"
+ ARTIFACT_TYPE=tarball
+ uploadimages
+ else
+ RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch
+ RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
+ VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//')
+ for pkg in common undercloud; do # removed onos for danube
+ RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
+ done
+ SRPM_INSTALL_PATH=$BUILD_DIRECTORY
+ SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL)
+ VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//')
+ for pkg in common undercloud; do # removed onos for danube
+ SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
+ done
- if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then
- signrpm
+ if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then
+ signrpm
+ fi
+ uploadrpm
fi
- uploadrpm
else
echo "ERROR: Unknown artifact type ${ARTIFACT_TYPE} to upload...exiting"
exit 1
echo "Done!"
if [ "$ARTIFACT_TYPE" == 'iso' ]; then echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"; fi
if [ "$ARTIFACT_TYPE" == 'rpm' ]; then echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"; fi
+if [ "$ARTIFACT_TYPE" == 'tarball' ]; then echo "Dev tarball Artifact is available as http://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz)"; fi
- project:
- name: apex
+ name: 'apex'
+ project: 'apex'
jobs:
- 'apex-verify-{stream}'
- 'apex-verify-gate-{stream}'
- 'apex-verify-unit-tests-{stream}'
- - 'apex-runner-{platform}-{scenario}-{stream}'
- 'apex-runner-cperf-{stream}'
- 'apex-build-{stream}'
- - 'apex-deploy-virtual-{scenario}-{stream}'
- - 'apex-deploy-baremetal-{scenario}-{stream}'
- - 'apex-daily-{stream}'
+ - 'apex-deploy-{platform}-{stream}'
+ - 'apex-daily-master'
+ - 'apex-daily-danube'
- 'apex-csit-promote-daily-{stream}'
- 'apex-fdio-promote-daily-{stream}'
- 'apex-verify-iso-{stream}'
-
+ - 'apex-deploy-test-baremetal-{stream}'
+ - 'apex-upload-snapshot'
+ - 'apex-create-snapshot'
# stream: branch with - in place of / (eg. stable-arno)
# branch: branch (eg. stable/arno)
stream:
- master:
branch: 'master'
gs-pathname: ''
- slave: 'lf-pod1'
- verify-slave: 'apex-verify-master'
- daily-slave: 'apex-daily-master'
+ build-slave: 'apex-build-master'
+ virtual-slave: 'apex-virtual-master'
+ baremetal-slave: 'apex-baremetal-master'
+ verify-scenario: 'os-odl-nofeature-ha'
+
- danube:
branch: 'stable/danube'
gs-pathname: '/danube'
- slave: 'lf-pod1'
- verify-slave: 'apex-verify-danube'
- daily-slave: 'apex-daily-danube'
-
- project: 'apex'
-
- scenario:
- - 'os-nosdn-nofeature-noha'
- - 'os-nosdn-nofeature-ha'
- - 'os-nosdn-nofeature-ha-ipv6'
- - 'os-nosdn-ovs-noha'
- - 'os-nosdn-ovs-ha'
- - 'os-nosdn-fdio-noha'
- - 'os-nosdn-fdio-ha'
- - 'os-nosdn-kvm-ha'
- - 'os-nosdn-kvm-noha'
- - 'os-odl_l2-fdio-noha'
- - 'os-odl_l2-fdio-ha'
- - 'os-odl_l2-netvirt_gbp_fdio-noha'
- - 'os-odl_l2-sfc-noha'
- - 'os-odl_l3-nofeature-noha'
- - 'os-odl_l3-nofeature-ha'
- - 'os-odl_l3-ovs-noha'
- - 'os-odl_l3-ovs-ha'
- - 'os-odl-bgpvpn-ha'
- - 'os-odl-gluon-noha'
- - 'os-odl_l3-fdio-noha'
- - 'os-odl_l3-fdio-ha'
- - 'os-odl_l3-fdio_dvr-noha'
- - 'os-odl_l3-fdio_dvr-ha'
- - 'os-odl_l3-csit-noha'
- - 'os-onos-nofeature-ha'
- - 'os-ovn-nofeature-noha'
- - 'gate'
+ build-slave: 'apex-build-danube'
+ virtual-slave: 'apex-virtual-danube'
+ baremetal-slave: 'apex-baremetal-danube'
+ verify-scenario: 'os-odl_l3-nofeature-ha'
+ disabled: false
platform:
- 'baremetal'
- job-template:
name: 'apex-verify-unit-tests-{stream}'
- node: '{verify-slave}'
+ node: '{build-slave}'
concurrent: true
- project-parameter:
project: '{project}'
branch: '{branch}'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from parameters macro."
scm:
- git-scm-gerrit
option: 'project'
builders:
- - 'apex-unit-test'
+ - shell:
+ !include-raw-escape: ./apex-unit-test.sh
# Verify
- job-template:
name: 'apex-verify-{stream}'
- node: '{verify-slave}'
+ node: '{virtual-slave}'
concurrent: true
+ project-type: 'multijob'
+
parameters:
- apex-parameter:
- gs-pathname: '{gs-pathname}'
+ gs-pathname: '{gs-pathname}/dev'
- project-parameter:
project: '{project}'
branch: '{branch}'
- string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from parameters macro."
-
+ name: ARTIFACT_VERSION
+ default: dev
+ description: "Used for overriding the ARTIFACT_VERSION"
scm:
- git-scm-gerrit
blocking-jobs:
- 'apex-daily.*'
- 'apex-deploy.*'
- - 'apex-build.*'
- 'apex-runner.*'
- 'apex-verify.*'
- throttle:
option: 'project'
builders:
- - 'apex-unit-test'
- - 'apex-build'
- - trigger-builds:
- - project: 'apex-deploy-virtual-os-odl_l3-nofeature-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-verify-{stream}
- OPNFV_CLEAN=yes
- git-revision: false
- block: true
- same-node: true
- - trigger-builds:
- - project: 'functest-apex-{verify-slave}-suite-{stream}'
- predefined-parameters: |
- DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
- FUNCTEST_SUITE_NAME=healthcheck
- block: true
- same-node: true
- - 'apex-workspace-cleanup'
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - multijob:
+ name: basic
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-verify-unit-tests-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ OPNFV_CLEAN=yes
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ FUNCTEST_SUITE_NAME=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: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
# Verify Scenario Gate
- job-template:
name: 'apex-verify-gate-{stream}'
- node: '{verify-slave}'
+ node: '{virtual-slave}'
concurrent: true
+ project-type: 'multijob'
+
parameters:
- apex-parameter:
- gs-pathname: '{gs-pathname}'
+ gs-pathname: '{gs-pathname}/dev'
- project-parameter:
project: '{project}'
branch: '{branch}'
option: 'project'
builders:
- - 'apex-build'
- - trigger-builds:
- - project: 'apex-deploy-virtual-gate-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-verify-gate-{stream}
- OPNFV_CLEAN=yes
- current-parameters: true
- git-revision: false
- block: true
- same-node: true
- - trigger-builds:
- - project: 'functest-apex-{verify-slave}-suite-{stream}'
- predefined-parameters: |
- DEPLOY_SCENARIO=os-nosdn-nofeature-ha
- FUNCTEST_SUITE_NAME=healthcheck
- block: true
- same-node: true
- - 'apex-workspace-cleanup'
-
-- job-template:
- name: 'apex-runner-{platform}-{scenario}-{stream}'
-
- # runner jobs for deploying manually
-
- node: '{slave}'
-
- disabled: false
-
- parameters:
- - apex-parameter:
- gs-pathname: '{gs-pathname}'
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from parameters macro."
-
- scm:
- - git-scm
-
- properties:
- - logrotate-default
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - 'apex-daily.*'
- - 'apex-verify.*'
- - 'apex-.*-promote.*'
-
- builders:
- - trigger-builds:
- - project: 'apex-deploy-{platform}-{scenario}-{stream}'
- predefined-parameters:
- OPNFV_CLEAN=yes
- git-revision: false
- block: true
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO={scenario}
- block: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'functest-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO={scenario}
- block: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=gate
+ OPNFV_CLEAN=yes
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ FUNCTEST_SUITE_NAME=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: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
- job-template:
name: 'apex-runner-cperf-{stream}'
# runner cperf job
-
+ project-type: 'multijob'
node: 'intel-pod2'
disabled: false
option: 'project'
builders:
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-noha-{stream}'
- predefined-parameters:
- OPNFV_CLEAN=yes
- git-revision: false
- block: true
- same-node: true
- - trigger-builds:
- - project: 'cperf-apex-intel-pod2-daily-master'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
- block: true
- same-node: true
-
+ - description-setter:
+ description: "Deployed on $NODE_NAME"
+ - multijob:
+ name: 'Baremetal Deploy'
+ condition: ALWAYS
+ projects:
+ - name: 'apex-deploy-baremetal-{stream}'
+ node-parameters: false
+ current-parameters: true
+ predefined-parameters: |
+ OPNFV_CLEAN=yes
+ DEPLOY_SCENARIO={verify-scenario}
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: Functest
+ condition: ALWAYS
+ projects:
+ - name: 'functest-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={verify-scenario}
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+
+# Build phase
- job-template:
name: 'apex-build-{stream}'
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{daily-slave}'
+ node: '{build-slave}'
disabled: false
concurrent: true
parameters:
+ - '{project}-defaults'
- project-parameter:
project: '{project}'
branch: '{branch}'
- apex-parameter:
gs-pathname: '{gs-pathname}'
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from parameters macro."
scm:
- git-scm
properties:
- logrotate-default
- - build-blocker:
- use-build-blocker: true
- block-level: 'NODE'
- blocking-jobs:
- - 'apex-deploy.*'
- throttle:
max-per-node: 1
max-total: 10
builders:
- 'apex-build'
- - trigger-builds:
- - project: 'apex-deploy-virtual-os-nosdn-nofeature-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: false
- same-node: true
- block: true
- inject:
properties-content: ARTIFACT_TYPE=rpm
- 'apex-upload-artifact'
- - trigger-builds:
- - project: 'apex-verify-iso-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- git-revision: false
- block: true
- same-node: true
- - inject:
- properties-content: ARTIFACT_TYPE=iso
- - 'apex-upload-artifact'
# ISO verify job
- job-template:
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{daily-slave}'
+ node: '{virtual-slave}'
disabled: false
builders:
- 'apex-iso-verify'
+ - inject:
+ properties-content: ARTIFACT_TYPE=iso
+ - 'apex-upload-artifact'
+# Deploy job
- job-template:
- name: 'apex-deploy-virtual-{scenario}-{stream}'
+ name: 'apex-deploy-{platform}-{stream}'
# Job template for virtual deployment
#
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{slave}'
+ node: 'apex-{platform}-{stream}'
concurrent: true
gs-pathname: '{gs-pathname}'
- string:
name: DEPLOY_SCENARIO
- default: '{scenario}'
+ default: '{verify-scenario}'
description: "Scenario to deploy with."
- string:
name: OPNFV_CLEAN
option: 'project'
builders:
+ - description-setter:
+ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+ - 'apex-download-artifact'
- 'apex-deploy'
- 'apex-workspace-cleanup'
+
+# Baremetal Deploy and Test
- job-template:
- name: 'apex-deploy-baremetal-{scenario}-{stream}'
+ name: 'apex-deploy-test-baremetal-{stream}'
- # Job template for baremetal deployment
+ # Job template for daily build
#
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{slave}'
+ project-type: 'multijob'
disabled: false
- git-scm
parameters:
+ - '{project}-defaults'
+ - '{project}-baremetal-{stream}-defaults'
- project-parameter:
project: '{project}'
branch: '{branch}'
gs-pathname: '{gs-pathname}'
- string:
name: DEPLOY_SCENARIO
- default: '{scenario}'
+ default: '{verify-scenario}'
description: "Scenario to deploy with."
-
properties:
- logrotate-default
- build-blocker:
blocking-jobs:
- 'apex-verify.*'
- 'apex-deploy.*'
- - 'apex-build.*'
+ - 'apex-runner.*'
+ - 'apex-.*-promote.*'
+ builders:
+ - description-setter:
+ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+ - multijob:
+ name: 'Baremetal Deploy'
+ condition: ALWAYS
+ projects:
+ - name: 'apex-deploy-baremetal-{stream}'
+ node-parameters: true
+ current-parameters: true
+ predefined-parameters: |
+ OPNFV_CLEAN=yes
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: Functest
+ condition: ALWAYS
+ projects:
+ - name: 'functest-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+ - multijob:
+ name: Yardstick
+ condition: ALWAYS
+ projects:
+ - name: 'yardstick-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+
+
+# danube Daily
+- job-template:
+ name: 'apex-daily-danube'
+
+ # Job template for daily build
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ project-type: 'multijob'
+ node: 'apex-baremetal-danube'
+
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - '{project}-defaults'
+ - '{project}-baremetal-danube-defaults'
+ - project-parameter:
+ project: '{project}'
+ branch: 'stable/danube'
+ - apex-parameter:
+ gs-pathname: '/danube'
+
+ properties:
+ - logrotate-default
+
+ triggers:
+ - 'apex-danube'
builders:
- - 'apex-deploy'
- - 'apex-workspace-cleanup'
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-danube'
+ current-parameters: false
+ predefined-parameters: |
+ 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
+ git-revision: true
+ - multijob:
+ name: 'Verify and upload ISO'
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-verify-iso-danube'
+ current-parameters: false
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-build-danube/.build
+ 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
+ git-revision: true
+ - multijob:
+ name: Baremetal Deploy and Test Phase
+ condition: SUCCESSFUL
+ projects:
-# Daily
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-ha-ipv6
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-ovs-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-ovs-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-fdio-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-fdio-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-kvm-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-kvm-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-fdio-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-fdio-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-sfc-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-ovs-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-ovs-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl-bgpvpn-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl-gluon-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-fdio-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-fdio-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-fdio_dvr-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-fdio_dvr-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-csit-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-onos-nofeature-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-danube'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-ovn-nofeature-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+
+# master Daily
- job-template:
- name: 'apex-daily-{stream}'
+ name: 'apex-daily-master'
# Job template for daily build
#
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{daily-slave}'
+ project-type: 'multijob'
+
+ node: 'apex-baremetal-master'
disabled: false
- git-scm
parameters:
+ - '{project}-defaults'
+ - '{project}-baremetal-master-defaults'
- project-parameter:
project: '{project}'
- branch: '{branch}'
+ branch: 'master'
- apex-parameter:
- gs-pathname: '{gs-pathname}'
+ gs-pathname: ''
properties:
- logrotate-default
- - build-blocker:
- use-build-blocker: true
- block-level: 'NODE'
- blocking-jobs:
- - 'apex-verify.*'
- - 'apex-deploy.*'
- - 'apex-build.*'
- - 'apex-runner.*'
- - 'apex-.*-promote.*'
triggers:
- - 'apex-{stream}'
+ - 'apex-master'
builders:
- - trigger-builds:
- - project: 'apex-build-{stream}'
- git-revision: true
- current-parameters: true
- same-node: true
- block: true
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-nosdn-nofeature-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-nofeature-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-nofeature-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- # 1.dovetail only master by now, not sync with A/B/C branches
- # 2.here the stream means the SUT stream, dovetail stream is defined in its own job
- # 3.only debug testsuite here(includes basic testcase,
- # i.e. one tempest smoke ipv6, two vping from functest)
- # 4.not used for release criteria or compliance,
- # only to debug the dovetail tool bugs with apex
- #- trigger-builds:
- # - project: 'dovetail-apex-{slave}-proposed_tests-{stream}'
- # current-parameters: false
- # predefined-parameters:
- # DEPLOY_SCENARIO=os-nosdn-nofeature-ha
- # block: true
- # same-node: true
- # block-thresholds:
- # build-step-failure-threshold: 'never'
- # failure-threshold: 'never'
- # unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl-bgpvpn-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl-bgpvpn-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl-bgpvpn-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl-gluon-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl-gluon-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl-gluon-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l2-fdio-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l2-fdio-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l2-fdio-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l2-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l2-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-nosdn-kvm-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-kvm-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-kvm-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l3-fdio-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-nosdn-fdio-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-fdio-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-nosdn-ovs-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-ovs-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-nosdn-ovs-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-odl_l3-ovs-ha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-ovs-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-odl_l3-ovs-ha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'apex-deploy-baremetal-os-ovn-nofeature-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-build-{stream}/.build
- OPNFV_CLEAN=yes
- git-revision: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- block: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-ovn-nofeature-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
- - trigger-builds:
- - project: 'yardstick-apex-{slave}-daily-{stream}'
- predefined-parameters:
- DEPLOY_SCENARIO=os-ovn-nofeature-noha
- block: true
- same-node: true
- block-thresholds:
- build-step-failure-threshold: 'never'
- failure-threshold: 'never'
- unstable-threshold: 'FAILURE'
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-master'
+ current-parameters: false
+ predefined-parameters: |
+ 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
+ git-revision: true
+ - multijob:
+ name: 'Verify and upload ISO'
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-verify-iso-master'
+ current-parameters: false
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-build-master/.build
+ 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
+ git-revision: true
+ - multijob:
+ name: Baremetal Deploy and Test Phase
+ condition: SUCCESSFUL
+ projects:
+
+ - name: 'apex-deploy-test-baremetal-master'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-master'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-master'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl-nofeature-ha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+ - name: 'apex-deploy-test-baremetal-master'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl-nofeature-noha
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+
+
+
+# snapshot create
+- job-template:
+ name: 'apex-create-snapshot'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+
+ disabled: false
+
+ builders:
+ - shell:
+ !include-raw-escape: ./apex-snapshot-create.sh
+
+# snapshot upload
+- job-template:
+ name: 'apex-upload-snapshot'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+
+ disabled: false
+
+ builders:
+ - inject:
+ properties-content: ARTIFACT_TYPE=snapshot
+ - 'apex-upload-artifact'
# CSIT promote
- job-template:
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{daily-slave}'
-
+ node: '{virtual-slave}'
+ project-type: 'multijob'
disabled: false
scm:
- timed: '0 12 * * 0'
builders:
- - 'apex-build'
- - trigger-builds:
- - project: 'apex-deploy-virtual-os-odl_l3-csit-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-csit-promote-daily-{stream}
- OPNFV_CLEAN=yes
- git-revision: false
- block: true
- same-node: true
- - trigger-builds:
- - project: 'functest-apex-{daily-slave}-suite-{stream}'
- predefined-parameters: |
- DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
- FUNCTEST_SUITE_NAME=tempest_smoke_serial
- block: true
- same-node: true
- - shell:
- !include-raw-escape: ./apex-snapshot-create.sh
- - inject:
- properties-content: ARTIFACT_TYPE=snapshot
- - 'apex-upload-artifact'
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-csit-noha
+ OPNFV_CLEAN=yes
+ 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
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
+ FUNCTEST_SUITE_NAME=tempest_smoke_serial
+ 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
+ git-revision: false
+ - multijob:
+ name: create snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-create-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: upload snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-upload-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
# FDIO promote
- job-template:
# Required Variables:
# stream: branch with - in place of / (eg. stable)
# branch: branch (eg. stable)
- node: '{daily-slave}'
-
+ node: '{virtual-slave}'
+ project-type: 'multijob'
disabled: false
scm:
- 'apex-daily.*'
builders:
- - 'apex-build'
- - trigger-builds:
- - project: 'apex-deploy-virtual-os-odl_l2-fdio-noha-{stream}'
- predefined-parameters: |
- BUILD_DIRECTORY=apex-fdio-promote-daily-{stream}
- OPNFV_CLEAN=yes
- git-revision: false
- block: true
- same-node: true
- - shell:
- !include-raw-escape: ./apex-snapshot-create.sh
- - inject:
- properties-content: ARTIFACT_TYPE=snapshot
- - 'apex-upload-artifact'
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha
+ OPNFV_CLEAN=yes
+ 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
+ git-revision: false
+ - multijob:
+ name: create snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-create-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: upload snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-upload-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
- job-template:
name: 'apex-gs-clean-{stream}'
triggers:
- 'apex-gs-clean-{stream}'
-
########################
# parameter macros
########################
description: "Artifact version type"
- string:
name: BUILD_DIRECTORY
- default: $WORKSPACE/build
+ default: $WORKSPACE/.build
description: "Directory where the build artifact will be located upon the completion of the build."
- string:
name: CACHE_DIRECTORY
description: "Version directory where opnfv artifacts are stored in gs repository"
- string:
name: GS_URL
- default: artifacts.opnfv.org/$PROJECT{gs-pathname}
+ default: $GS_BASE{gs-pathname}
description: "URL to Google Storage."
########################
- shell:
!include-raw: ./apex-upload-artifact.sh
+- builder:
+ name: 'apex-download-artifact'
+ builders:
+ - shell:
+ !include-raw: ./apex-download-artifact.sh
+
- builder:
name: 'apex-gs-cleanup'
builders:
- shell:
!include-raw: ./apex-deploy.sh
-
#######################
# trigger macros
########################
- trigger:
name: 'apex-gs-clean-{stream}'
triggers:
- - timed: '0 2 * * *'
+ - timed: '0 2 * * *'
\ No newline at end of file
--- /dev/null
+- project:
+ name: 'apex'
+ project: 'apex'
+ jobs:
+ - 'apex-verify-{stream}'
+ - 'apex-verify-gate-{stream}'
+ - 'apex-verify-unit-tests-{stream}'
+ - 'apex-runner-cperf-{stream}'
+ - 'apex-build-{stream}'
+ - 'apex-deploy-{platform}-{stream}'
+ - 'apex-daily-master'
+ - 'apex-daily-danube'
+ - 'apex-csit-promote-daily-{stream}'
+ - 'apex-fdio-promote-daily-{stream}'
+ - 'apex-verify-iso-{stream}'
+ - 'apex-deploy-test-baremetal-{stream}'
+ - 'apex-upload-snapshot'
+ - 'apex-create-snapshot'
+ # stream: branch with - in place of / (eg. stable-arno)
+ # branch: branch (eg. stable/arno)
+ stream:
+ - master:
+ branch: 'master'
+ gs-pathname: ''
+ build-slave: 'apex-build-master'
+ virtual-slave: 'apex-virtual-master'
+ baremetal-slave: 'apex-baremetal-master'
+ verify-scenario: 'os-odl-nofeature-ha'
+
+ - danube:
+ branch: 'stable/danube'
+ gs-pathname: '/danube'
+ build-slave: 'apex-build-danube'
+ virtual-slave: 'apex-virtual-danube'
+ baremetal-slave: 'apex-baremetal-danube'
+ verify-scenario: 'os-odl_l3-nofeature-ha'
+ disabled: false
+
+ platform:
+ - 'baremetal'
+ - 'virtual'
+
+# Unit Test
+- job-template:
+ name: 'apex-verify-unit-tests-{stream}'
+
+ node: '{build-slave}'
+
+ concurrent: true
+
+ parameters:
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+
+ 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: 'apex'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'tests/**'
+ properties:
+ - logrotate-default
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - shell:
+ !include-raw-escape: ./apex-unit-test.sh
+
+# Verify
+- job-template:
+ name: 'apex-verify-{stream}'
+
+ node: '{virtual-slave}'
+
+ concurrent: true
+
+ project-type: 'multijob'
+
+ parameters:
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}/dev'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - string:
+ name: ARTIFACT_VERSION
+ default: dev
+ description: "Used for overriding the ARTIFACT_VERSION"
+ 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: 'apex'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'ci/**'
+ - compare-type: ANT
+ pattern: 'build/**'
+ - compare-type: ANT
+ pattern: 'lib/**'
+ - compare-type: ANT
+ pattern: 'config/**'
+
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-daily.*'
+ - 'apex-deploy.*'
+ - 'apex-runner.*'
+ - 'apex-verify.*'
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - multijob:
+ name: basic
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-verify-unit-tests-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ OPNFV_CLEAN=yes
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ FUNCTEST_SUITE_NAME=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: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+
+# Verify Scenario Gate
+- job-template:
+ name: 'apex-verify-gate-{stream}'
+
+ node: '{virtual-slave}'
+
+ concurrent: true
+
+ project-type: 'multijob'
+
+ parameters:
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}/dev'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Used for overriding the GIT URL coming from parameters macro."
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.opnfv.org'
+ trigger-on:
+ - comment-added-contains-event:
+ comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'apex'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'ci/**'
+ - compare-type: ANT
+ pattern: 'build/**'
+ - compare-type: ANT
+ pattern: 'lib/**'
+ - compare-type: ANT
+ pattern: 'config/**'
+
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-daily.*'
+ - 'apex-deploy.*'
+ - 'apex-build.*'
+ - 'apex-runner.*'
+ - 'apex-verify.*'
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=gate
+ OPNFV_CLEAN=yes
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={verify-scenario}
+ FUNCTEST_SUITE_NAME=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: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+
+- job-template:
+ name: 'apex-runner-cperf-{stream}'
+
+ # runner cperf job
+ project-type: 'multijob'
+ node: 'intel-pod2'
+
+ disabled: false
+
+ parameters:
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Used for overriding the GIT URL coming from parameters macro."
+
+ scm:
+ - git-scm
+
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: false
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-deploy.*'
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - description-setter:
+ description: "Deployed on $NODE_NAME"
+ - multijob:
+ name: 'Baremetal Deploy'
+ condition: ALWAYS
+ projects:
+ - name: 'apex-deploy-baremetal-{stream}'
+ node-parameters: false
+ current-parameters: true
+ predefined-parameters: |
+ OPNFV_CLEAN=yes
+ DEPLOY_SCENARIO={verify-scenario}
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: Functest
+ condition: ALWAYS
+ projects:
+ - name: 'functest-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={verify-scenario}
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+
+# Build phase
+- job-template:
+ name: 'apex-build-{stream}'
+
+ # Job template for builds
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: '{build-slave}'
+
+ disabled: false
+
+ concurrent: true
+
+ parameters:
+ - '{project}-defaults'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ scm:
+ - git-scm
+
+ properties:
+ - logrotate-default
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - 'apex-build'
+ - inject:
+ properties-content: ARTIFACT_TYPE=rpm
+ - 'apex-upload-artifact'
+
+# ISO verify job
+- job-template:
+ name: 'apex-verify-iso-{stream}'
+
+ # Job template for builds
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: '{virtual-slave}'
+
+ disabled: false
+
+ concurrent: true
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Used for overriding the GIT URL coming from parameters macro."
+
+ scm:
+ - git-scm
+
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-deploy.*'
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - 'apex-iso-verify'
+ - inject:
+ properties-content: ARTIFACT_TYPE=iso
+ - 'apex-upload-artifact'
+
+# Deploy job
+- job-template:
+ name: 'apex-deploy-{platform}-{stream}'
+
+ # Job template for virtual deployment
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: 'apex-{platform}-{stream}'
+
+ concurrent: true
+
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: '{verify-scenario}'
+ description: "Scenario to deploy with."
+ - string:
+ name: OPNFV_CLEAN
+ default: 'no'
+ description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
+
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-deploy.*'
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - description-setter:
+ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+ - 'apex-download-artifact'
+ - 'apex-deploy'
+ - 'apex-workspace-cleanup'
+
+
+# Baremetal Deploy and Test
+- job-template:
+ name: 'apex-deploy-test-baremetal-{stream}'
+
+ # Job template for daily build
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ project-type: 'multijob'
+
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - '{project}-defaults'
+ - '{project}-baremetal-{stream}-defaults'
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: '{verify-scenario}'
+ description: "Scenario to deploy with."
+ properties:
+ - logrotate-default
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-verify.*'
+ - 'apex-deploy.*'
+ - 'apex-runner.*'
+ - 'apex-.*-promote.*'
+ builders:
+ - description-setter:
+ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+ - multijob:
+ name: 'Baremetal Deploy'
+ condition: ALWAYS
+ projects:
+ - name: 'apex-deploy-baremetal-{stream}'
+ node-parameters: true
+ current-parameters: true
+ predefined-parameters: |
+ OPNFV_CLEAN=yes
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: Functest
+ condition: ALWAYS
+ projects:
+ - name: 'functest-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+ - multijob:
+ name: Yardstick
+ condition: ALWAYS
+ projects:
+ - name: 'yardstick-apex-baremetal-daily-{stream}'
+ node-parameters: true
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+ kill-phase-on: NEVER
+ abort-all-job: false
+ git-revision: false
+
+{% for stream in scenarios %}
+# {{ stream }} Daily
+- job-template:
+ name: 'apex-daily-{{ stream }}'
+
+ # Job template for daily build
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ project-type: 'multijob'
+
+ node: '{{ build_slave[stream] }}'
+
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - '{project}-defaults'
+ - '{project}-baremetal-{{ stream }}-defaults'
+ - project-parameter:
+ project: '{project}'
+ branch: '{{ branch[stream] }}'
+ - apex-parameter:
+ gs-pathname: '{{ gspathname[stream] }}'
+
+ properties:
+ - logrotate-default
+
+ triggers:
+ - 'apex-{{ stream }}'
+
+ builders:
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{{ stream }}'
+ current-parameters: false
+ predefined-parameters: |
+ 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
+ git-revision: true
+ - multijob:
+ name: 'Verify and upload ISO'
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-verify-iso-{{ stream }}'
+ current-parameters: false
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-build-{{ stream }}/.build
+ 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
+ git-revision: true
+ - multijob:
+ name: Baremetal Deploy and Test Phase
+ condition: SUCCESSFUL
+ projects:
+{% for scenario in scenarios[stream] %}
+ - name: 'apex-deploy-test-baremetal-{{ stream }}'
+ node-parameters: false
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={{scenario}}
+ OPNFV_CLEAN=yes
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
+{% endfor %}
+{% endfor %}
+
+# snapshot create
+- job-template:
+ name: 'apex-create-snapshot'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+
+ disabled: false
+
+ builders:
+ - shell:
+ !include-raw-escape: ./apex-snapshot-create.sh
+
+# snapshot upload
+- job-template:
+ name: 'apex-upload-snapshot'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+
+ disabled: false
+
+ builders:
+ - inject:
+ properties-content: ARTIFACT_TYPE=snapshot
+ - 'apex-upload-artifact'
+
+# CSIT promote
+- job-template:
+ name: 'apex-csit-promote-daily-{stream}'
+
+ # Job template for promoting CSIT Snapshots
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: '{virtual-slave}'
+ project-type: 'multijob'
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-verify.*'
+ - 'apex-deploy.*'
+ - 'apex-build.*'
+ - 'apex-runner.*'
+ - 'apex-daily.*'
+
+ triggers:
+ - timed: '0 12 * * 0'
+
+ builders:
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-csit-noha
+ OPNFV_CLEAN=yes
+ 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
+ git-revision: false
+ - multijob:
+ name: functest-smoke
+ condition: SUCCESSFUL
+ projects:
+ - name: 'functest-apex-virtual-suite-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
+ FUNCTEST_SUITE_NAME=tempest_smoke_serial
+ 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
+ git-revision: false
+ - multijob:
+ name: create snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-create-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: upload snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-upload-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+
+# FDIO promote
+- job-template:
+ name: 'apex-fdio-promote-daily-{stream}'
+
+ # Job template for promoting CSIT Snapshots
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: '{virtual-slave}'
+ project-type: 'multijob'
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-verify.*'
+ - 'apex-deploy.*'
+ - 'apex-build.*'
+ - 'apex-runner.*'
+ - 'apex-daily.*'
+
+ builders:
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-build-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: true
+ - multijob:
+ name: deploy-virtual
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-deploy-virtual-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha
+ OPNFV_CLEAN=yes
+ 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
+ git-revision: false
+ - multijob:
+ name: create snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-create-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+ - multijob:
+ name: upload snapshot
+ condition: SUCCESSFUL
+ projects:
+ - name: 'apex-upload-snapshot'
+ current-parameters: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ git-revision: false
+
+- job-template:
+ name: 'apex-gs-clean-{stream}'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ node: '{slave}'
+
+ disabled: false
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ builders:
+ - 'apex-gs-clean'
+
+ triggers:
+ - 'apex-gs-clean-{stream}'
+
+########################
+# parameter macros
+########################
+- parameter:
+ name: apex-parameter
+ parameters:
+ - string:
+ name: ARTIFACT_NAME
+ default: 'latest'
+ description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
+ - string:
+ name: ARTIFACT_VERSION
+ default: 'daily'
+ description: "Artifact version type"
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/.build
+ description: "Directory where the build artifact will be located upon the completion of the build."
+ - string:
+ name: CACHE_DIRECTORY
+ default: $HOME/opnfv/cache{gs-pathname}
+ description: "Directory where the cache to be used during the build is located."
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+ - string:
+ name: GS_PATHNAME
+ default: '{gs-pathname}'
+ description: "Version directory where opnfv artifacts are stored in gs repository"
+ - string:
+ name: GS_URL
+ default: $GS_BASE{gs-pathname}
+ description: "URL to Google Storage."
+
+########################
+# builder macros
+########################
+- builder:
+ name: 'apex-unit-test'
+ builders:
+ - shell:
+ !include-raw: ./apex-unit-test.sh
+
+- builder:
+ name: 'apex-build'
+ builders:
+ - shell:
+ !include-raw: ./apex-build.sh
+
+- builder:
+ name: 'apex-workspace-cleanup'
+ builders:
+ - shell:
+ !include-raw: ./apex-workspace-cleanup.sh
+
+- builder:
+ name: 'apex-iso-verify'
+ builders:
+ - shell:
+ !include-raw: ./apex-iso-verify.sh
+
+
+- builder:
+ name: 'apex-upload-artifact'
+ builders:
+ - shell:
+ !include-raw: ./apex-upload-artifact.sh
+
+- builder:
+ name: 'apex-download-artifact'
+ builders:
+ - shell:
+ !include-raw: ./apex-download-artifact.sh
+
+- builder:
+ name: 'apex-gs-cleanup'
+ builders:
+ - shell:
+ !include-raw: ./apex-gs-cleanup.sh
+
+- builder:
+ name: 'apex-deploy'
+ builders:
+ - shell:
+ !include-raw: ./apex-deploy.sh
+
+#######################
+# trigger macros
+########################
+- trigger:
+ name: 'apex-master'
+ triggers:
+ - timed: '0 3 1 1 7'
+- trigger:
+ name: 'apex-danube'
+ triggers:
+ - timed: '0 12 * * *'
+- trigger:
+ name: 'apex-gs-clean-{stream}'
+ triggers:
+ - timed: '0 2 * * *'
--- /dev/null
+master:
+ - 'os-nosdn-nofeature-noha'
+ - 'os-nosdn-nofeature-ha'
+ - 'os-odl-nofeature-ha'
+ - 'os-odl-nofeature-noha'
+danube:
+ - 'os-nosdn-nofeature-noha'
+ - 'os-nosdn-nofeature-ha'
+ - 'os-nosdn-nofeature-ha-ipv6'
+ - 'os-nosdn-ovs-noha'
+ - 'os-nosdn-ovs-ha'
+ - 'os-nosdn-fdio-noha'
+ - 'os-nosdn-fdio-ha'
+ - 'os-nosdn-kvm-ha'
+ - 'os-nosdn-kvm-noha'
+ - 'os-odl_l2-fdio-noha'
+ - 'os-odl_l2-fdio-ha'
+ - 'os-odl_l2-netvirt_gbp_fdio-noha'
+ - 'os-odl_l2-sfc-noha'
+ - 'os-odl_l3-nofeature-noha'
+ - 'os-odl_l3-nofeature-ha'
+ - 'os-odl_l3-ovs-noha'
+ - 'os-odl_l3-ovs-ha'
+ - 'os-odl-bgpvpn-ha'
+ - 'os-odl-gluon-noha'
+ - 'os-odl_l3-fdio-noha'
+ - 'os-odl_l3-fdio-ha'
+ - 'os-odl_l3-fdio_dvr-noha'
+ - 'os-odl_l3-fdio_dvr-ha'
+ - 'os-odl_l3-csit-noha'
+ - 'os-onos-nofeature-ha'
+ - 'os-ovn-nofeature-noha'
sudo virtualenv venv
source venv/bin/activate
sudo pip install -e ./ >/dev/null
+sudo pip install netaddr
if [[ ${INSTALLER_TYPE} == compass ]]; then
options="-u root -p root"
fi
pod_file_dir="/home/opnfv/dovetail/userconfig"
+if [ -d ${pod_file_dir} ]; then
+ sudo rm -rf ${pod_file_dir}/*
+else
+ sudo mkdir -p ${pod_file_dir}
+fi
cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml"
echo ${cmd}
${cmd}
installer: compass
<<: *danube
# apex CI PODs
- - apex-verify-master:
- slave-label: '{pod}'
+ - virtual:
+ slave-label: apex-virtual-master
installer: apex
<<: *master
- - apex-daily-master:
- slave-label: '{pod}'
+ - baremetal:
+ slave-label: apex-baremetal-master
installer: apex
<<: *master
- - apex-verify-danube:
- slave-label: '{pod}'
+ - virtual:
+ slave-label: apex-virtual-danube
installer: apex
<<: *danube
- - apex-daily-danube:
- slave-label: '{pod}'
+ - baremetal:
+ slave-label: apex-baremetal-danube
installer: apex
<<: *danube
# armband CI PODs
# use of the new labels are in place
#####################################################
- parameter:
- name: 'apex-daily-master-defaults'
+ name: 'apex-baremetal-master-defaults'
parameters:
- label:
name: SLAVE_LABEL
- default: 'apex-daily-master'
+ default: 'apex-baremetal-master'
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
default-slaves:
- lf-pod1
- parameter:
- name: 'apex-daily-danube-defaults'
+ name: 'apex-baremetal-danube-defaults'
parameters:
- label:
name: SLAVE_LABEL
- default: 'apex-daily-danube'
+ default: 'apex-baremetal-danube'
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
default-slaves:
- lf-pod1
- parameter:
- name: 'apex-verify-master-defaults'
+ name: 'apex-virtual-master-defaults'
parameters:
- label:
name: SLAVE_LABEL
- default: 'apex-verify-master'
+ default: 'apex-virtual-master'
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
name: SLAVE_NAME
description: 'Slave name on Jenkins'
allowed-slaves:
- - intel-virtual3
- - intel-virtual4
- - intel-virtual5
+ - lf-virtual2
+ - lf-virtual3
default-slaves:
- - intel-virtual3
- - intel-virtual4
- - intel-virtual5
+ - lf-virtual2
+ - lf-virtual3
+
- parameter:
- name: 'apex-verify-danube-defaults'
+ name: 'apex-virtual-danube-defaults'
parameters:
- label:
name: SLAVE_LABEL
- default: 'apex-verify-danube'
+ default: 'apex-virtual-danube'
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
name: SLAVE_NAME
description: 'Slave name on Jenkins'
allowed-slaves:
- - intel-virtual3
- - intel-virtual4
- - intel-virtual5
+ - lf-pod3
default-slaves:
- - intel-virtual3
- - intel-virtual4
- - intel-virtual5
+ - lf-pod3
- parameter:
name: 'lf-pod1-defaults'
parameters:
name: SSH_KEY
default: /root/.ssh/id_rsa
description: 'SSH key to use for Apex'
+- parameter:
+ name: 'lf-pod3-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - lf-pod3
+ default-slaves:
+ - lf-pod3
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: SSH_KEY
+ default: /root/.ssh/id_rsa
+ description: 'SSH key to use for Apex'
#####################################################
# Parameters for CI baremetal PODs
#####################################################
Other installers use key file of each node.
"""
if not os.path.exists(os.path.dirname(args.filepath)):
- os.path.makedirs(os.path.dirname(args.filepath))
+ os.makedirs(os.path.dirname(args.filepath))
nodes = handler.nodes
node_list = []
index = 1
export PYTHONPATH="${PYTHONPATH}:."
export CONFIG_REPORTING_YAML=./reporting.yaml
-declare -a versions=(colorado master)
+declare -a versions=(danube master)
declare -a projects=(functest storperf yardstick)
project=$1
# yardstick |
# storperf |
+function report_project()
+{
+ project=$1
+ dir=$2
+ type=$3
+ echo "********************************"
+ echo " $project reporting "
+ echo "********************************"
+ python ./$dir/reporting-$type.py
+ if [ $? ]; then
+ echo "$project reporting $type...OK"
+ else
+ echo "$project reporting $type...KO"
+ fi
+}
+
if [ -z "$1" ]; then
echo "********************************"
echo " Functest reporting "
python ./storperf/reporting-status.py
echo "Storperf reporting status...OK"
+ report_project "QTIP" "qtip" "status"
+
else
if [ -z "$2" ]; then
reporting_type="status"
test_case.isRunnable))
time.sleep(1)
if test_case.isRunnable:
- dbName = test_case.getDbName()
name = test_case.getName()
displayName = test_case.getDisplayName()
project = test_case.getProject()
nb_test_runnable_for_this_scenario += 1
logger.info(" Searching results for case %s " %
(displayName))
- result = rp_utils.getResult(dbName, installer,
+ result = rp_utils.getResult(name, installer,
s, version)
# if no result set the value to 0
if result < 0:
test_case.isRunnable))
time.sleep(1)
if test_case.isRunnable:
- dbName = test_case.getDbName()
name = test_case.getName()
displayName = test_case.getDisplayName()
project = test_case.getProject()
logger.info(" Searching results for case %s " %
(displayName))
- result = rp_utils.getResult(dbName, installer,
+ result = rp_utils.getResult(name, installer,
s, version)
# at least 1 result for the test
if result > -1:
<tr class="tr-weather-weather">
{% for test in items[scenario] -%}
{% if test.getCriteria() > 2 -%}
- <td><img src="../../../img/weather-clear.png"></td>
+ <td><img src="../../img/weather-clear.png"></td>
{%- elif test.getCriteria() > 1 -%}
- <td><img src="../../../img/weather-few-clouds.png"></td>
+ <td><img src="../../img/weather-few-clouds.png"></td>
{%- elif test.getCriteria() > 0 -%}
- <td><img src="../../../img/weather-overcast.png"></td>
+ <td><img src="../../img/weather-overcast.png"></td>
{%- elif test.getCriteria() > -1 -%}
- <td><img src="../../../img/weather-storm.png"></td>
+ <td><img src="../../img/weather-storm.png"></td>
{%- endif %}
{%- endfor %}
</tr>
'bgpvpn': 'bgpvpn',
'rally_full': 'Rally (full)',
'vims': 'vIMS',
- 'doctor': 'Doctor',
+ 'doctor-notification': 'Doctor',
'promise': 'Promise',
'moon': 'Moon',
'copper': 'Copper',
'security_scan': 'Security',
'multisite': 'Multisite',
- 'domino': 'Domino',
- 'odl-sfc': 'SFC',
+ 'domino-multinode': 'Domino',
+ 'functest-odl-sfc': 'SFC',
'onos_sfc': 'SFC',
- 'parser': 'Parser',
+ 'parser-basics': 'Parser',
'connection_check': 'Health (connection)',
'api_check': 'Health (api)',
'snaps_smoke': 'SNAPS',
'snaps_health_check': 'Health (dhcp)',
- 'netready': 'Netready',
+ 'gluon_vping': 'Netready',
'fds': 'FDS',
'cloudify_ims': 'vIMS (Cloudify)',
'orchestra_ims': 'OpenIMS (OpenBaton)',
'opera_ims': 'vIMS (Open-O)',
'vyos_vrouter': 'vyos',
- 'barometer': 'Barometer'}
+ 'barometercollectd': 'Barometer',
+ 'odl_netvirt': 'Netvirt',
+ 'security_scan': 'Security'}
try:
self.displayName = display_name_matrix[self.name]
except:
";IsRunnable" + str(self.isRunnable))
return testcase
- def getDbName(self):
- # Correspondance name of the test case / name in the DB
- # ideally we should modify the DB to avoid such interface....
- # '<name in the config>':'<name in the DB>'
- # I know it is uggly...
- test_match_matrix = {'healthcheck': 'healthcheck',
- 'vping_ssh': 'vping_ssh',
- 'vping_userdata': 'vping_userdata',
- 'odl': 'odl',
- 'onos': 'onos',
- 'ocl': 'ocl',
- 'tempest_smoke_serial': 'tempest_smoke_serial',
- 'tempest_full_parallel': 'tempest_full_parallel',
- 'tempest_defcore': 'tempest_defcore',
- 'refstack_defcore': 'refstack_defcore',
- 'rally_sanity': 'rally_sanity',
- 'bgpvpn': 'bgpvpn',
- 'rally_full': 'rally_full',
- 'vims': 'vims',
- 'doctor': 'doctor-notification',
- 'promise': 'promise',
- 'moon': 'moon_authentication',
- 'copper': 'copper-notification',
- 'security_scan': 'security',
- 'multisite': 'multisite',
- 'domino': 'domino-multinode',
- 'odl-sfc': 'functest-odl-sfc',
- 'onos_sfc': 'onos_sfc',
- 'parser': 'parser-basics',
- 'connection_check': 'connection_check',
- 'api_check': 'api_check',
- 'snaps_smoke': 'snaps_smoke',
- 'snaps_health_check': 'snaps_health_check',
- 'netready': 'gluon_vping',
- 'fds': 'fds',
- 'cloudify_ims': 'cloudify_ims',
- 'orchestra_ims': 'orchestra_ims',
- 'opera_ims': 'opera_ims',
- 'vyos_vrouter': 'vyos_vrouter',
- 'barometer': 'barometercollectd'}
- try:
- return test_match_matrix[self.name]
- except:
- return "unknown"
-
def getDisplayName(self):
return self.displayName
--- /dev/null
+// ******************************************
+// Trend line for reporting
+// based on scenario_history.txt
+// where data looks like
+// date,scenario,installer,detail,score
+// 2016-09-22 13:12,os-nosdn-fdio-noha,apex,4/12,33.0
+// 2016-09-22 13:13,os-odl_l2-fdio-noha,apex,12/15,80.0
+// 2016-09-22 13:13,os-odl_l2-sfc-noha,apex,18/24,75.0
+// .....
+// ******************************************
+// Set the dimensions of the canvas / graph
+var trend_margin = {top: 20, right: 30, bottom: 50, left: 40},
+ trend_width = 300 - trend_margin.left - trend_margin.right,
+ trend_height = 130 - trend_margin.top - trend_margin.bottom;
+
+// Parse the date / time
+var parseDate = d3.time.format("%Y-%m-%d %H:%M").parse;
+
+// Set the ranges
+var trend_x = d3.time.scale().range([0, trend_width]);
+var trend_y = d3.scale.linear().range([trend_height, 0]);
+
+// Define the axes
+var trend_xAxis = d3.svg.axis().scale(trend_x)
+ .orient("bottom").ticks(2).tickFormat(d3.time.format("%m-%d"));
+
+var trend_yAxis = d3.svg.axis().scale(trend_y)
+ .orient("left").ticks(4, "s");
+
+// Define the line
+var valueline = d3.svg.line()
+ .x(function(d) { return trend_x(d.date); })
+ .y(function(d) { return trend_y(d.score); });
+
+var trend = function(container, trend_data) {
+
+ var trend_svg = d3.select(container)
+ .append("svg")
+ .attr("width", trend_width + trend_margin.left + trend_margin.right)
+ .attr("height", trend_height + trend_margin.top + trend_margin.bottom)
+ .attr("style", "font-size: small")
+ .append("g")
+ .attr("transform",
+ "translate(" + trend_margin.left + "," + trend_margin.top + ")");
+
+ // Scale the range of the data
+ trend_x.domain(d3.extent(trend_data, function(d) { return d.date; }));
+ trend_y.domain([0, d3.max(trend_data, function(d) { return d.score; })]);
+
+ // Add the X Axis
+ trend_svg.append("g")
+ .attr("class", "x axis")
+ .attr("transform", "translate(0," + trend_height + ")")
+ .call(trend_xAxis);
+
+ // Add the Y Axis
+ trend_svg.append("g")
+ .attr("class", "y axis")
+ .call(trend_yAxis);
+
+ // Add the valueline path.
+ trend_svg.append("path")
+ .attr("class", "line")
+ .attr("d", valueline(trend_data))
+ .attr("stroke", "steelblue")
+ .attr("fill", "none");
+
+ trend_svg.selectAll(".dot")
+ .data(trend_data)
+ .enter().append("circle")
+ .attr("r", 2.5)
+ .attr("cx", function(d) { return trend_x(d.date); })
+ .attr("cy", function(d) { return trend_y(d.score); });
+
+ return trend;
+}
--- /dev/null
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <!-- Bootstrap core CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
+ <link href="default.css" rel="stylesheet">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function (){
+ $(".btn-more").click(function() {
+ $(this).hide();
+ $(this).parent().find(".panel-default").show();
+ });
+ })
+ </script>
+ </head>
+ <body>
+ <div class="container">
+ <div class="masthead">
+ <h3 class="text-muted">QTIP reporting page</h3>
+ <nav>
+ <ul class="nav nav-justified">
+ <li class="active"><a href="http://testresults.opnfv.org/reporting/index.html">Home</a></li>
+ <li><a href="index-status-apex.html">Apex</a></li>
+ <li><a href="index-status-compass.html">Compass</a></li>
+ <li><a href="index-status-fuel.html">Fuel</a></li>
+ <li><a href="index-status-joid.html">Joid</a></li>
+ </ul>
+ </nav>
+ </div>
+<div class="row">
+ <div class="col-md-1"></div>
+ <div class="col-md-10">
+ <div class="page-main">
+ <h2>QTIP</h2>
+ QTIP is used in OPNFV for verifying the OPNFV infrastructure and some of the OPNFV features.
+ <br>The QTIP framework is deployed in several OPNFV community labs.
+ <br>It is installer, infrastructure and application independent.
+
+ <h2>Useful Links</h2>
+ <li><a href="https://wiki.opnfv.org/download/attachments/5734608/qtip%20in%20depth.pdf?version=1&modificationDate=1463410431000&api=v2">QTIP in Depth</a></li>
+ <li><a href="https://git.opnfv.org/cgit/qtip">QTIP Repo</a></li>
+ <li><a href="https://wiki.opnfv.org/display/qtip">QTIP Project</a></li>
+ <li><a href="https://build.opnfv.org/ci/view/qtip/">QTIP Jenkins page</a></li>
+ <li><a href="https://jira.opnfv.org/browse/QTIP-119?jql=project%20%3D%20QTIP">JIRA</a></li>
+
+ </div>
+ </div>
+ <div class="col-md-1"></div>
+</div>
--- /dev/null
+#!/usr/bin/python
+#
+# 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
+#
+import datetime
+import os
+
+import jinja2
+import utils.reporting_utils as rp_utils
+import utils.scenarioResult as sr
+
+installers = rp_utils.get_config('general.installers')
+versions = rp_utils.get_config('general.versions')
+PERIOD = rp_utils.get_config('general.period')
+
+# Logger
+logger = rp_utils.getLogger("Qtip-Status")
+reportingDate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
+
+logger.info("*******************************************")
+logger.info("* Generating reporting scenario status *")
+logger.info("* Data retention = %s days *" % PERIOD)
+logger.info("* *")
+logger.info("*******************************************")
+
+
+def prepare_profile_file(version):
+ profile_dir = './display/{}/qtip'.format(version)
+ if not os.path.exists(profile_dir):
+ os.makedirs(profile_dir)
+
+ profile_file = '{}/scenario_history.txt'.format(profile_dir, version)
+ if not os.path.exists(profile_file):
+ with open(profile_file, 'w') as f:
+ info = 'date,scenario,installer,details,score\n'
+ f.write(info)
+ f.close()
+ return profile_file
+
+
+def profile_results(results, installer, profile_fd):
+ result_criterias = {}
+ for s_p, s_p_result in results.iteritems():
+ ten_criteria = len(s_p_result)
+ ten_score = sum(s_p_result)
+
+ LASTEST_TESTS = rp_utils.get_config(
+ 'general.nb_iteration_tests_success_criteria')
+ four_result = s_p_result[:LASTEST_TESTS]
+ four_criteria = len(four_result)
+ four_score = sum(four_result)
+
+ s_four_score = str(four_score / four_criteria)
+ s_ten_score = str(ten_score / ten_criteria)
+
+ info = '{},{},{},{},{}\n'.format(reportingDate,
+ s_p,
+ installer,
+ s_ten_score,
+ s_four_score)
+ profile_fd.write(info)
+ result_criterias[s_p] = sr.ScenarioResult('OK',
+ s_four_score,
+ s_ten_score,
+ '100')
+
+ logger.info("--------------------------")
+ return result_criterias
+
+
+def render_html(prof_results, installer, version):
+ template_loader = jinja2.FileSystemLoader(".")
+ template_env = jinja2.Environment(loader=template_loader,
+ autoescape=True)
+
+ template_file = "./qtip/template/index-status-tmpl.html"
+ template = template_env.get_template(template_file)
+
+ render_outcome = template.render(prof_results=prof_results,
+ installer=installer,
+ period=PERIOD,
+ version=version,
+ date=reportingDate)
+
+ with open('./display/{}/qtip/status-{}.html'.format(version, installer),
+ 'wb') as fh:
+ fh.write(render_outcome)
+
+
+def render_reporter():
+ for version in versions:
+ profile_file = prepare_profile_file(version)
+ profile_fd = open(profile_file, 'a')
+ for installer in installers:
+ results = rp_utils.getQtipResults(version, installer)
+ prof_results = profile_results(results, installer, profile_fd)
+ render_html(prof_results=prof_results,
+ installer=installer,
+ version=version)
+ profile_fd.close()
+ logger.info("Manage export CSV")
+ rp_utils.generate_csv(profile_file)
+ logger.info("CSV generated...")
+
+if __name__ == '__main__':
+ render_reporter()
--- /dev/null
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <!-- Bootstrap core CSS -->
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
+ <link href="../../css/default.css" rel="stylesheet">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
+ <script type="text/javascript" src="../../js/trend-qtip.js"></script>
+ <script>
+ // trend line management
+ d3.csv("./scenario_history.csv", function(data) {
+ // ***************************************
+ // Create the trend line
+ {% for scenario in prof_results.keys() -%}
+ // for scenario {{scenario}}
+ // Filter results
+ var trend{{loop.index}} = data.filter(function(row) {
+ return row["scenario"]=="{{scenario}}" && row["installer"]=="{{installer}}";
+ })
+ // Parse the date
+ trend{{loop.index}}.forEach(function(d) {
+ d.date = parseDate(d.date);
+ d.score = +d.score
+ });
+ // Draw the trend line
+ var mytrend = trend("#trend_svg{{loop.index}}",trend{{loop.index}})
+ // ****************************************
+ {%- endfor %}
+ });
+ </script>
+ <script type="text/javascript">
+ $(document).ready(function (){
+ $(".btn-more").click(function() {
+ $(this).hide();
+ $(this).parent().find(".panel-default").show();
+ });
+ })
+ </script>
+ </head>
+ <body>
+ <div class="container">
+ <div class="masthead">
+ <h3 class="text-muted">QTIP status page ({{version}}, {{date}})</h3>
+ <nav>
+ <ul class="nav nav-justified">
+ <li class="active"><a href="http://testresults.opnfv.org/reporting/index.html">Home</a></li>
+ <li><a href="index-status-apex.html">Apex</a></li>
+ <li><a href="index-status-compass.html">Compass</a></li>
+ <li><a href="index-status-fuel.html">Fuel</a></li>
+ <li><a href="index-status-joid.html">Joid</a></li>
+ </ul>
+ </nav>
+ </div>
+<div class="row">
+ <div class="col-md-1"></div>
+ <div class="col-md-10">
+ <div class="page-header">
+ <h2>{{installer}}</h2>
+ </div>
+
+ <div class="scenario-overview">
+ <div class="panel-heading"><h4><b>List of last scenarios ({{version}}) run over the last {{period}} days </b></h4></div>
+ <table class="table">
+ <tr>
+ <th width="25%">Pod/Scenario</th>
+ <th width="25%">Trend</th>
+ <th width="25%">Last 4 Iterations</th>
+ <th width="25%">Last 10 Days</th>
+ </tr>
+ {% for scenario,result in prof_results.iteritems() -%}
+ <tr class="tr-ok">
+ <td>{{scenario}}</td>
+ <td><div id="trend_svg{{loop.index}}"></div></td>
+ <td>{{prof_results[scenario].getFourDaysScore()}}</td>
+ <td>{{prof_results[scenario].getTenDaysScore()}}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+
+
+ </div>
+ <div class="col-md-1"></div>
+</div>
log_level: ERROR
qtip:
+ log_level: ERROR
+ period: 1
bottleneck:
return result_dict
+def getQtipResults(version, installer):
+ period = get_config('qtip.period')
+ url_base = get_config('testapi.url')
+
+ url = ("http://" + url_base + "?project=qtip" +
+ "&installer=" + installer +
+ "&version=" + version + "&period=" + str(period))
+ request = Request(url)
+
+ try:
+ response = urlopen(request)
+ k = response.read()
+ response.close()
+ results = json.loads(k)['results']
+ except URLError as e:
+ print('Got an error code:', e)
+
+ result_dict = {}
+ if results:
+ for r in results:
+ key = '{}/{}'.format(r['pod_name'], r['scenario'])
+ if key not in result_dict.keys():
+ result_dict[key] = []
+ result_dict[key].append(r['details']['score'])
+
+ # return scenario_results
+ return result_dict
+
+
def getNbtestOk(results):
nb_test_ok = 0
for r in results:
scenario_installer_file.close
+def generate_csv(scenario_file):
+ import shutil
+ # csv
+ # generate sub files based on scenario_history.txt
+ csv_file = scenario_file.replace('txt', 'csv')
+ shutil.copy2(scenario_file, csv_file)
+
+
def export_pdf(pdf_path, pdf_doc_name):
try:
pdfkit.from_file(pdf_path, pdf_doc_name)
##############################################################################
import functools
-from tornado import web, gen
+from tornado import gen
+from tornado import web
-from opnfv_testapi.common import raises, message
+from opnfv_testapi.common import message
+from opnfv_testapi.common import raises
def authenticate(method):
from tornado import gen
from tornado import web
-import models
from opnfv_testapi.common import check
from opnfv_testapi.common import message
from opnfv_testapi.common import raises
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
DEFAULT_REPRESENTATION = "application/json"
# feng.xiaowei@zte.com.cn mv TestResut to result_models.py 5-23-2016
# feng.xiaowei@zte.com.cn add ModelBase 12-20-2016
##############################################################################
-import copy
import ast
-
+import copy
from opnfv_testapi.tornado_swagger import swagger
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
import handlers
+from opnfv_testapi.resources import pod_models
from opnfv_testapi.tornado_swagger import swagger
-import pod_models
class GenericPodHandler(handlers.GenericApiHandler):
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import models
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import handlers
+from opnfv_testapi.resources import handlers
+from opnfv_testapi.resources import project_models
from opnfv_testapi.tornado_swagger import swagger
-import project_models
class GenericProjectHandler(handlers.GenericApiHandler):
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import models
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import models
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
-import models
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import models
+from opnfv_testapi.resources import models
from opnfv_testapi.tornado_swagger import swagger
@swagger.model()
class TestcaseCreateRequest(models.ModelBase):
def __init__(self, name, url=None, description=None,
- tier=None, ci_loop=None, criteria=None,
- blocking=None, dependencies=None, run=None,
+ catalog_description=None, tier=None, ci_loop=None,
+ criteria=None, blocking=None, dependencies=None, run=None,
domains=None, tags=None, version=None):
self.name = name
self.url = url
self.description = description
+ self.catalog_description = catalog_description
self.tier = tier
self.ci_loop = ci_loop
self.criteria = criteria
@swagger.model()
class TestcaseUpdateRequest(models.ModelBase):
def __init__(self, name=None, description=None, project_name=None,
- tier=None, ci_loop=None, criteria=None,
- blocking=None, dependencies=None, run=None,
+ catalog_description=None, tier=None, ci_loop=None,
+ criteria=None, blocking=None, dependencies=None, run=None,
domains=None, tags=None, version=None, trust=None):
self.name = name
self.description = description
+ self.catalog_description = catalog_description
self.project_name = project_name
self.tier = tier
self.ci_loop = ci_loop
class Testcase(models.ModelBase):
def __init__(self, _id=None, name=None, project_name=None,
description=None, url=None, creation_date=None,
- tier=None, ci_loop=None, criteria=None,
- blocking=None, dependencies=None, run=None,
+ catalog_description=None, tier=None, ci_loop=None,
+ criteria=None, blocking=None, dependencies=None, run=None,
domains=None, tags=None, version=None,
trust=None):
self._id = None
self.name = None
self.project_name = None
self.description = None
+ self.catalog_description = None
self.url = None
self.creation_date = None
self.tier = None
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from tornado.web import URLSpec, StaticFileHandler
+import tornado.web
-from settings import default_settings, \
- SWAGGER_API_DOCS, SWAGGER_API_LIST, SWAGGER_API_SPEC
-from views import SwaggerUIHandler, SwaggerResourcesHandler, SwaggerApiHandler
+from opnfv_testapi.tornado_swagger import settings
+from opnfv_testapi.tornado_swagger import views
def swagger_handlers():
- prefix = default_settings.get('swagger_prefix', '/swagger')
+ prefix = settings.docs_settings.get('swagger_prefix', '/swagger')
if prefix[-1] != '/':
prefix += '/'
def _path(suffix):
return prefix + suffix
return [
- URLSpec(
+ tornado.web.URLSpec(
_path(r'spec.html$'),
- SwaggerUIHandler,
- default_settings,
- name=SWAGGER_API_DOCS),
- URLSpec(
- _path(r'spec.json$'),
- SwaggerResourcesHandler,
- default_settings,
- name=SWAGGER_API_LIST),
- URLSpec(
- _path(r'spec$'),
- SwaggerApiHandler,
- default_settings,
- name=SWAGGER_API_SPEC),
+ views.SwaggerUIHandler,
+ settings.docs_settings,
+ name=settings.API_DOCS_NAME),
+ tornado.web.URLSpec(
+ _path(r'resources.json$'),
+ views.SwaggerResourcesHandler,
+ settings.docs_settings,
+ name=settings.RESOURCE_LISTING_NAME),
+ tornado.web.URLSpec(
+ _path(r'APIs$'),
+ views.SwaggerApiHandler,
+ settings.docs_settings,
+ name=settings.API_DECLARATION_NAME),
(
_path(r'(.*\.(css|png|gif|js))'),
- StaticFileHandler,
- {'path': default_settings.get('static_path')}),
+ tornado.web.StaticFileHandler,
+ {'path': settings.docs_settings.get('static_path')}),
]
##############################################################################
import os.path
-SWAGGER_VERSION = '1.2'
-SWAGGER_API_DOCS = 'swagger-api-docs'
-SWAGGER_API_LIST = 'swagger-api-list'
-SWAGGER_API_SPEC = 'swagger-api-spec'
+API_DOCS_NAME = 'swagger-api-docs'
+RESOURCE_LISTING_NAME = 'swagger-resource-listing'
+API_DECLARATION_NAME = 'swagger-api-declaration'
STATIC_PATH = os.path.join(os.path.dirname(os.path.normpath(__file__)),
'static')
-default_settings = {
+docs_settings = {
'base_url': '',
'static_path': STATIC_PATH,
'swagger_prefix': '/swagger',
'api_version': 'v1.0',
+ 'swagger_version': '1.2',
'api_key': '',
'enabled_methods': ['get', 'post', 'put', 'patch', 'delete'],
'exclude_namespaces': [],
}
models = []
-
-
-def basePath():
- return default_settings.get('base_url')
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import inspect
-from functools import wraps
from HTMLParser import HTMLParser
+from functools import wraps
+import inspect
import epydoc.markup
import tornado.web
-from settings import default_settings, models
-from handlers import swagger_handlers
+from opnfv_testapi.tornado_swagger import handlers
+from opnfv_testapi.tornado_swagger import settings
class EpytextParser(HTMLParser):
if '__init__' in dir(cls):
self._parse_args(cls.__init__)
self.parse_docstring(inspect.getdoc(cls))
- models.append(self)
+ settings.models.append(self)
def _parse_args(self, func):
argspec = inspect.getargspec(func)
def docs(**opts):
- default_settings.update(opts)
+ settings.docs_settings.update(opts)
class Application(tornado.web.Application):
- def __init__(self, handlers=None,
+ def __init__(self, app_handlers=None,
default_host="",
transforms=None,
**settings):
- super(Application, self).__init__(swagger_handlers() + handlers,
- default_host,
- transforms,
- **settings)
+ super(Application, self).__init__(
+ handlers.swagger_handlers() + app_handlers,
+ default_host,
+ transforms,
+ **settings)
##############################################################################
import inspect
import json
+import os.path
import tornado.template
import tornado.web
-from settings import SWAGGER_VERSION, SWAGGER_API_LIST, SWAGGER_API_SPEC
-from settings import models, basePath
+from opnfv_testapi.tornado_swagger import settings
def json_dumps(obj, pretty=False):
- return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': ')) \
- if pretty else json.dumps(obj)
+ return json.dumps(obj,
+ sort_keys=True,
+ indent=4,
+ separators=(',', ': ')) if pretty else json.dumps(obj)
class SwaggerUIHandler(tornado.web.RequestHandler):
- def initialize(self, static_path, **kwds):
- self.static_path = static_path
+ def initialize(self, **kwargs):
+ self.static_path = kwargs.get('static_path')
+ self.base_url = kwargs.get('base_url')
def get_template_path(self):
return self.static_path
def get(self):
- discovery_url = basePath() + self.reverse_url(SWAGGER_API_LIST)
+ discovery_url = os.path.join(
+ self.base_url,
+ self.reverse_url(settings.RESOURCE_LISTING_NAME))
self.render('index.html', discovery_url=discovery_url)
class SwaggerResourcesHandler(tornado.web.RequestHandler):
- def initialize(self, api_version, exclude_namespaces, **kwds):
- self.api_version = api_version
- self.exclude_namespaces = exclude_namespaces
+ def initialize(self, **kwargs):
+ self.api_version = kwargs.get('api_version')
+ self.swagger_version = kwargs.get('swagger_version')
+ self.base_url = kwargs.get('base_url')
+ self.exclude_namespaces = kwargs.get('exclude_namespaces')
def get(self):
self.set_header('content-type', 'application/json')
resources = {
'apiVersion': self.api_version,
- 'swaggerVersion': SWAGGER_VERSION,
- 'basePath': basePath(),
+ 'swaggerVersion': self.swagger_version,
+ 'basePath': self.base_url,
'produces': ["application/json"],
'description': 'Test Api Spec',
'apis': [{
- 'path': self.reverse_url(SWAGGER_API_SPEC),
+ 'path': self.reverse_url(settings.API_DECLARATION_NAME),
'description': 'Test Api Spec'
}]
}
class SwaggerApiHandler(tornado.web.RequestHandler):
- def initialize(self, api_version, base_url, **kwds):
- self.api_version = api_version
- self.base_url = base_url
+ def initialize(self, **kwargs):
+ self.api_version = kwargs.get('api_version')
+ self.swagger_version = kwargs.get('swagger_version')
+ self.base_url = kwargs.get('base_url')
def get(self):
self.set_header('content-type', 'application/json')
specs = {
'apiVersion': self.api_version,
- 'swaggerVersion': SWAGGER_VERSION,
- 'basePath': basePath(),
+ 'swaggerVersion': self.swagger_version,
+ 'basePath': self.base_url,
'apis': [self.__get_api_spec__(path, spec, operations)
for path, spec, operations in apis],
- 'models': self.__get_models_spec(models)
+ 'models': self.__get_models_spec(settings.models)
}
self.finish(json_dumps(specs, self.get_arguments('pretty')))