################################### # job configuration for functest ################################### - project: name: yardstick project: '{name}' #-------------------------------- # BRANCH ANCHORS #-------------------------------- master: &master stream: master branch: '{stream}' gs-pathname: '' brahmaputra: &brahmaputra stream: brahmaputra branch: 'stable/{stream}' gs-pathname: '{stream}' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- # brahmaputra #-------------------------------- pod: - opnfv-jump-1: installer: apex suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - opnfv-jump-2: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - intel-pod5: installer: joid suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - huawei-us-deploy-bare-1: installer: compass suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - ericsson-pod1: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - ericsson-pod2: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - virtual: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - huawei-virtual: installer: compass suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - virtual: installer: joid suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra #-------------------------------- # master #-------------------------------- - ericsson-pod1: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - ericsson-pod1: installer: fuel suite: vtcdaily auto-trigger-name: 'yardstick-vtcdaily-ericsson-pod1-trigger' <<: *master - ericsson-pod2: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - intel-pod6: installer: joid suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - intel-pod8: installer: compass suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - zte-build-1: installer: fuel suite: daily auto-trigger-name: 'yardstick-daily-zte-build-1-trigger' <<: *master - orange-pod2: installer: joid suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - opnfv-jump-1: installer: apex suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - virtual: installer: fuel suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - huawei-virtual: installer: compass suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - virtual: installer: joid suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master #-------------------------------- jobs: - 'yardstick-{installer}-{pod}-{suite}-{stream}' ################################ # job templates ################################ - job-template: name: 'yardstick-{installer}-{pod}-{suite}-{stream}' disabled: false concurrent: true properties: - throttle: enabled: true max-per-node: 1 wrappers: - build-name: name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' triggers: - '{auto-trigger-name}' parameters: - project-parameter: project: '{project}' - '{pod}-defaults' - '{installer}-defaults' - 'yardstick-params-{pod}' - string: name: DEPLOY_SCENARIO default: 'os-odl_l2-nofeature-ha' - string: name: YARDSTICK_SUITE_NAME default: opnfv_${{NODE_NAME}}_{suite}.yaml description: 'Path to test suite' - string: name: CI_DEBUG default: 'false' description: "Show debut output information" scm: - git-scm: credentials-id: '{ssh-credentials}' refspec: '' branch: '{branch}' builders: - 'yardstick-cleanup' #- 'yardstick-fetch-os-creds' - 'yardstick-{suite}' publishers: - email: recipients: ana.cunha@ericsson.com jorgen.w.karlsson@ericsson.com ######################## # builder macros ######################## - builder: name: yardstick-daily builders: - shell: | #!/bin/bash set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" # labconfig is used only for joid labconfig="" sshkey="" if [[ ${INSTALLER_TYPE} == 'apex' ]]; then instack_mac=$(sudo virsh domiflist instack | grep default | \ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'}) sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then #note: this happens only in opnfv-lf-pod1 sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable fi elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then # If production lab then creds may be retrieved dynamically # creds are on the jumphost, always in the same folder labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc" # If dev lab, credentials may not be the default ones, just provide a path to put them into docker # replace the default one by the customized one provided by jenkins config fi opts="--privileged=true --rm" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \ -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" # Pull the latest image docker pull opnfv/yardstick >$redirect # Run docker cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick \ run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}" echo "Yardstick: Running docker cmd: ${cmd}" ${cmd} echo "Yardstick: done!" - builder: name: yardstick-vtcdaily builders: - shell: | #!/bin/bash set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" cd $WORKSPACE ./ci/apexlake-verify - builder: name: yardstick-fetch-os-creds builders: - shell: !include-raw: ../../utils/fetch_os_creds.sh - builder: name: yardstick-cleanup builders: - shell: | #!/bin/bash [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" echo "Cleaning up docker containers/images..." # Remove previous running containers if exist if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then echo "Removing existing opnfv/yardstick containers..." docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect fi # Remove existing images if exist if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then echo "Docker images to remove:" docker images | head -1 && docker images | grep opnfv/yardstick image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}')) for tag in "${image_tags[@]}"; do echo "Removing docker image opnfv/yardstick:$tag..." docker rmi opnfv/yardstick:$tag >$redirect done fi ######################## # parameter macros ######################## - parameter: name: 'yardstick-params-intel-pod5' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-intel-pod6' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-intel-pod8' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-ericsson-pod1' parameters: - string: name: YARDSTICK_DB_BACKEND default: '-i 10.118.36.90:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-ericsson-pod2' parameters: - string: name: YARDSTICK_DB_BACKEND default: '-i 10.118.36.90:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-opnfv-jump-1' parameters: - string: name: YARDSTICK_DB_BACKEND default: '-r 213.77.62.197/results' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-opnfv-jump-2' parameters: - string: name: YARDSTICK_DB_BACKEND default: '-r 213.77.62.197/results' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-huawei-us-deploy-bare-1' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-zte-build-1' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-orange-pod2' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-virtual' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-huawei-virtual' parameters: - string: name: YARDSTICK_DB_BACKEND default: '' description: 'Arguments to use in order to choose the backend DB' ####################### ## trigger macros ####################### # trigger for PODs to only run yardstick test suites - trigger: name: 'yardstick-daily-zte-build-1-trigger' triggers: - timed: '0 2 * * *' - trigger: name: 'yardstick-vtcdaily-ericsson-pod1-trigger' triggers: - timed: '0 1 * * *'