if [ -z "$DEPLOY_SCENARIO" ]; then
echo "Deploy scenario not set!"
exit 1
-elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then
- echo "Detecting Gating scenario..."
- if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then
- echo "ERROR: Gate job triggered without comment!"
- exit 1
- else
- DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$')
- if [ -z "$DEPLOY_SCENARIO" ]; then
- echo "ERROR: Unable to detect scenario in Gerrit Comment!"
- echo "Format of comment to trigger gate should be 'start-gate-scenario: <scenario>'"
- exit 1
- else
- echo "Gate scenario detected: ${DEPLOY_SCENARIO}"
- fi
- fi
+else
+ echo "Deploy scenario: ${DEPLOY_SCENARIO}"
fi
# Dev or RPM/ISO build
if [ "$IPV6_FLAG" == "True" ]; then
NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml"
-elif echo ${DEPLOY_SCENARIO} | grep fdio; then
- NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_vpp.yaml"
else
NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml"
fi
if [ -z "$DEPLOY_SCENARIO" ]; then
echo "Deploy scenario not set!"
exit 1
-elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then
- echo "Detecting Gating scenario..."
- if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then
- echo "ERROR: Gate job triggered without comment!"
- exit 1
- else
- DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$')
- if [ -z "$DEPLOY_SCENARIO" ]; then
- echo "ERROR: Unable to detect scenario in Gerrit Comment!"
- echo "Format of comment to trigger gate should be 'start-gate-scenario: <scenario>'"
- exit 1
- else
- echo "Gate scenario detected: ${DEPLOY_SCENARIO}"
- fi
- fi
+else
+ echo "Deploy scenario: ${DEPLOY_SCENARIO}"
fi
# if upstream we do not need to download anything
option: 'project'
builders:
+ # yamllint disable rule:line-length
+ - shell: |
+ echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os|k8s-.*$') > detected_scenario
+ # yamllint enable rule:line-length
+ - inject:
+ properties-file: detected_scenario
- multijob:
name: deploy-virtual
condition: SUCCESSFUL
current-parameters: false
predefined-parameters: |
ARTIFACT_VERSION=$ARTIFACT_VERSION
- DEPLOY_SCENARIO=gate
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
OPNFV_CLEAN=yes
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
- # yamllint disable rule:line-length
- - shell: |
- echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario
- # yamllint enable rule:line-length
- - inject:
- properties-file: detected_scenario
- multijob:
name: functest-smoke
condition: ALWAYS
- 'os-nosdn-fdio-ha'
- 'os-nosdn-bar-ha'
- 'os-nosdn-bar-noha'
- - 'os-nosdn-nofeature-ha-ipv6'
- 'os-nosdn-ovs_dpdk-noha'
- 'os-nosdn-ovs_dpdk-ha'
- - 'os-nosdn-kvm_ovs_dpdk-noha'
- - 'os-nosdn-kvm_ovs_dpdk-ha'
- 'os-odl-sfc-noha'
- 'os-odl-sfc-ha'
- 'os-nosdn-calipso-noha'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
name: 'barometer-verify-{stream}'
gs-pathname: '/{stream}'
gs-packagepath: '/{stream}/{suite}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- gs-packagepath: '/{stream}/{suite}'
- disabled: false
suite:
- 'posca_stress_traffic'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- disabled: false
- job-template:
name: 'calipso-verify-{stream}'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
name: 'container4nfv-verify-{stream}'
- 'testapi-parameter'
- 'daisy-project-parameter':
gs-pathname: '{gs-pathname}'
+ - 'deploy-scenario'
builders:
- description-setter:
- condition-kind: regex-match
regex: 'baremetal'
label: '{pod}'
- - condition-kind: regex-match
- regex: 'master'
- label: '{stream}'
steps:
- trigger-builds:
- project: 'yardstick-daisy-{pod}-daily-{stream}'
- 'testapi-parameter'
- 'daisy-project-parameter':
gs-pathname: '{gs-pathname}'
+ - 'deploy-scenario'
- string:
name: DEPLOY_TIMEOUT
default: '150'
- trigger:
name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger'
triggers:
- - timed: '0 12 * * *'
+ - timed: ''
# Basic NOHA Scenarios
- trigger:
name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger'
- trigger:
name: 'daisy-os-odl-nofeature-ha-baremetal-daily-master-trigger'
triggers:
- - timed: '0 18 * * *'
+ - timed: ''
# ovs_dpdk Scenarios
- trigger:
name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-master-trigger'
- trigger:
name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-fraser-trigger'
triggers:
- - timed: '0 0 * * *'
+ - timed: '0 0,6 * * *'
# Basic NOHA Scenarios
- trigger:
name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-fraser-trigger'
- trigger:
name: 'daisy-os-odl-nofeature-ha-baremetal-daily-fraser-trigger'
triggers:
- - timed: '0 20 * * *'
+ - timed: '0 12,18 * * *'
# ovs_dpdk Scenarios
- trigger:
name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-fraser-trigger'
docker-tag: 'stable'
disabled: false
+ # feature projects' tests are not triggered by functest
+ # doctor verify Pods need to deploy with these scenario
installer:
- - 'apex'
- - 'fuel'
- - 'daisy'
+ - 'apex':
+ scenario: 'os-nosdn-kvm-ha'
+ - 'fuel':
+ scenario: 'os-nosdn-ovs-ha'
+ - 'daisy':
+ scenario: 'os-nosdn-ovs_dpdk-noha'
arch:
- 'x86_64'
# in phase jobs
echo "Triggering phase jobs!"
- multijob:
- name: 'doctor-verify-apex-inspector'
+ name: 'doctor-verify'
execution-type: PARALLEL
projects:
- name: 'doctor-verify-apex-{inspector}-x86_64-{stream}'
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
kill-phase-on: FAILURE
- current-parameters: true
git-revision: true
- - multijob:
- name: 'doctor-verify-fuel-inspector'
- execution-type: PARALLEL
- projects:
- name: 'doctor-verify-fuel-{inspector}-x86_64-{stream}'
predefined-parameters: |
PROJECT=$PROJECT
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
kill-phase-on: FAILURE
- current-parameters: true
git-revision: true
- - multijob:
- name: 'doctor-verify-fuel-inspector'
- execution-type: PARALLEL
- projects:
- name: 'doctor-verify-fuel-{inspector}-aarch64-{stream}'
predefined-parameters: |
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
kill-phase-on: FAILURE
- current-parameters: true
git-revision: true
- - multijob:
- name: 'doctor-verify-daisy-inspector'
- execution-type: PARALLEL
- projects:
- name: 'doctor-verify-daisy-{inspector}-x86_64-{stream}'
predefined-parameters: |
PROJECT=$PROJECT
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
kill-phase-on: FAILURE
- current-parameters: true
git-revision: true
- job-template:
description: 'Remove downloaded docker images (opnfv/functest:*)'
- string:
name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-ha'
+ default: '{scenario}'
description: 'Scenario to deploy and test'
- parameter:
branch: '{stream}'
gs-pathname: ''
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
name: 'domino-verify-{stream}'
gs-pathname: '{gs-pathname}'
- '{slave-label}-defaults':
installer: '{installer}'
+ - testapi-parameter
- string:
name: DEPLOY_SCENARIO
default: 'os-odl-nofeature-ha'
builders:
- description-setter:
description: "Built on $NODE_NAME"
+ - track-begin-timestamp
- shell:
!include-raw-escape: ./fuel-download-artifact.sh
- shell:
- email:
recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
- email-jenkins-admins-on-failure
+ - report-provision-result
- job-template:
name: 'fuel-collect-logs-{pod}-daily-{stream}'
gs-pathname: '{gs-pathname}'
- '{slave-label}-defaults':
installer: '{installer}'
+ - testapi-parameter
- string:
name: DEPLOY_SCENARIO
default: 'os-odl-nofeature-ha'
builders:
- description-setter:
description: "Built on $NODE_NAME"
+ - track-begin-timestamp
- shell:
!include-raw-escape: ./fuel-deploy.sh
- email:
recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
- email-jenkins-admins-on-failure
+ - report-provision-result
########################
# trigger macros
run_tiers() {
tiers=$1
- if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then
- cmd_opt="prepare_env start && run_tests -r -t all"
- [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all"
- else
- cmd_opt="run_tests -r -t all"
- [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all"
- fi
+ cmd_opt="run_tests -r -t all"
+ [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all"
ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
echo 0 > ${ret_val_file}
run_test() {
test_name=$1
- if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then
- cmd_opt="prepare_env start && run_tests -t ${test_name}"
- else
- cmd_opt="run_tests -t ${test_name}"
- fi
+ cmd_opt="run_tests -t ${test_name}"
ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
echo 0 > ${ret_val_file}
# Determine which Functest image should be used for the test case
cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert"
fi
-if [[ ${BRANCH} == "stable/euphrates" ]]; then
- rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds"
-else
- rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
-fi
+rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
# Set iptables rule to allow forwarding return traffic for container
if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
branch: '{stream}'
gs-pathname: ''
disabled: false
- - fraser:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- - euphrates:
+ - fraser: &fraser
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
branch: '{stream}'
gs-pathname: ''
disabled: false
- - fraser:
+ - fraser: &fraser
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- master:
branch: '{stream}'
disabled: false
+ - fraser:
+ branch: 'stable/{stream}'
+ disabled: false
arch_tag:
- 'amd64':
branch: '{stream}'
gs-pathname: ''
disabled: false
- - euphrates:
+ - fraser: &fraser
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
name: EXTERNAL_NETWORK
default: 'external'
description: 'external network for test'
+
+- parameter:
+ name: 'deploy-scenario'
+ parameters:
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-ha'
+ description: "OPNFV deployment scenario"
default: 'refs/heads/{branch}'
description: "Default refspec needed for manually triggering."
+##
+# Reporting Deployment Results
+#
+# To report deployment results to
+# http://testresults.opnfv.org/test/#/deployresults, add the following
+# parameters, builders, and publishers to a deployment job:
+#
+# parameters:
+# - testapi-parameter
+#
+# builders:
+# - track-begin-timestamp
+#
+# publishers:
+# - report-provision-result
+#
+# Note: The following string parameter must also exist, as they are used
+# when reporting the provision result:
+#
+# * INSTALLER
+# * INSTALLER_VERSION
+# * DEPLOY_SCENARIO
+#
+# most installers include these but you should verify first before
+# adding the publisher, otherwise the deployment build may be marked
+# unstable.
+#
+##
- parameter:
name: testapi-parameter
parameters:
name: TESTAPI_URL
default: 'http://testresults.opnfv.org/test/api/v1'
description: "Default TestAPI URL, currently using v1"
- - string:
- name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-ha'
- description: "OPNFV deployment scenario"
- string:
name: INSTALLER_VERSION
default: 'master'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
jobs:
- 'ovn4nfv-build-{stream}'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
name: 'parser-verify-{stream}'
disabled: false
pod:
- - zte-virtual6:
- installer: fuel
- pod: zte-virtual6
+ - zte-virtual5:
+ installer: apex
+ pod: zte-virtual5
################################
## job templates
pod: zte-virtual6
sut: vnf
<<: *master
+ - compute:
+ installer: apex
+ pod: zte-virtual5
+ sut: node
+ <<: *fraser
+ - storage:
+ installer: apex
+ pod: zte-virtual5
+ sut: ''
+ <<: *fraser
+ - compute:
+ installer: fuel
+ pod: zte-virtual6
+ sut: vnf
+ <<: *fraser
# -------------------------------
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
name: 'sfc-verify-{stream}'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- - euphrates:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
- job-template:
# -------------------------------
distro:
- 'xenial':
- disabled: false
+ disabled: true
dib-os-release: 'xenial'
dib-os-element: 'ubuntu-minimal'
dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl'
extra-dib-elements: 'openssh-server'
- 'centos7':
- disabled: false
+ disabled: true
dib-os-release: '7'
dib-os-element: 'centos-minimal'
dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
extra-dib-elements: 'openssh-server'
- 'opensuse423':
- disabled: false
+ disabled: true
dib-os-release: '42.3'
dib-os-element: 'opensuse-minimal'
dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
export XCI_PATH=/home/devuser/releng-xci
export XCI_VENV=${XCI_PATH}/venv
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; source ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; while read var; do declare -x \"\${var}\" 2>/dev/null; done < ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
echo "Running functest"
ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh"
# Record exit code
functest_exit=$?
+
+case ${DEPLOY_SCENARIO[0]} in
+ os-*)
+ FUNCTEST_LOG=/root/results/functest.log
+ ;;
+ k8-*)
+ FUNCTEST_LOG=/root/results/functest-kubernetes.log
+ ;;
+ *)
+ echo "Unable to determine the installer. Exiting!"
+ exit 1
+ ;;
+esac
+
echo "Functest log"
echo "---------------------------------------------------------------------------------"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat $FUNCTEST_LOG"
echo "---------------------------------------------------------------------------------"
exit ${functest_exit}
done
# For all other changes, we only need to set a default scenario if it's not set already
if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer\|xci/scenario'; then
- [[ ${#DEPLOY_SCENARIO[@]} -gt 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
+ [[ ${#DEPLOY_SCENARIO[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
fi
# extract releng-xci sha
installer: daisy
auto-trigger-name: 'daily-trigger-disabled'
<<: *master
+ - baremetal:
+ slave-label: daisy-baremetal
+ installer: daisy
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *fraser
- virtual:
slave-label: daisy-virtual
installer: daisy