X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fyardstick%2Fyardstick-ci-jobs.yml;h=f3c0ad4b172c53de51ade7dc8107d14734a253c8;hb=77af29fb9ef9c93524f72eb1479b098b377fd8b2;hp=1cb6d1f087b60c2338170a6b2c159c0c541479ad;hpb=75788714eef4a64f3119f855711c75165db5952a;p=releng.git diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 1cb6d1f08..f3c0ad4b1 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -13,55 +13,170 @@ stream: master branch: '{stream}' gs-pathname: '' + docker-tag: 'latest' brahmaputra: &brahmaputra stream: brahmaputra branch: 'stable/{stream}' gs-pathname: '{stream}' + docker-tag: 'brahmaputra.1.0' #-------------------------------- # 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 + - orange-pod2: + 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 #-------------------------------- + - opnfv-jump-2: + installer: fuel + suite: daily + auto-trigger-name: 'brahmaputra-trigger-daily-disabled' + <<: *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 - - huawei-us-deploy-bare-1: + - 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 + - huawei-us-deploy-bare-2: + installer: compass + 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 + - huawei-sh-test-2: + installer: compass + suite: daily + auto-trigger-name: 'yardstick-daily-huawei-sh-test-2-trigger' + <<: *master + - virtual: + installer: joid + suite: daily + auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master #-------------------------------- - loop: - - daily jobs: - - 'yardstick-{installer}-{pod}-{loop}-{stream}' + - 'yardstick-{installer}-{pod}-{suite}-{stream}' ################################ # job templates ################################ - job-template: - name: 'yardstick-{installer}-{pod}-{loop}-{stream}' + name: 'yardstick-{installer}-{pod}-{suite}-{stream}' disabled: false + concurrent: true + + properties: + - throttle: + enabled: true + max-per-node: 1 + wrappers: - build-name: - name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO' + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 180 + abort: true + + triggers: + - '{auto-trigger-name}' parameters: - project-parameter: @@ -69,10 +184,21 @@ - '{pod}-defaults' - '{installer}-defaults' - 'yardstick-params-{pod}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' - string: name: YARDSTICK_SUITE_NAME - default: opnfv_${{NODE_NAME}}_{loop}.yaml + 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: @@ -82,8 +208,8 @@ builders: - 'yardstick-cleanup' - - 'yardstick-fetch-os-creds' - - 'yardstick-daily' + #- 'yardstick-fetch-os-creds' + - 'yardstick-{suite}' publishers: - email: @@ -97,47 +223,76 @@ builders: - shell: | #!/bin/bash - set -o errexit + 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 - echo "Yardstick: Run benchmark test suites ..." + 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 - - docker run \ - --privileged=true \ - --rm \ - -t \ - -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \ - -e "INSTALLER_IP=${INSTALLER_IP}" \ - -e "POD_NAME=${NODE_NAME}" \ - -e "EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" \ - -e "YARDSTICK_BRANCH=${GERRIT_BRANCH}" \ - opnfv/yardstick \ - run_tests.sh $YARDSTICK_DB_BACKEND \ - $YARDSTICK_SUITE_NAME + docker pull opnfv/yardstick:$DOCKER_TAG >$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 + !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 | grep opnfv/yardstick | awk '{print $1}' | xargs docker stop - docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm + docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect + fi # Remove existing images if exist @@ -147,7 +302,8 @@ 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 + docker rmi opnfv/yardstick:$tag >$redirect + done fi ######################## @@ -158,11 +314,19 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '' + default: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: name: 'yardstick-params-intel-pod6' + parameters: + - string: + name: YARDSTICK_DB_BACKEND + default: '-i 104.197.68.199:8086' + description: 'Arguments to use in order to choose the backend DB' + +- parameter: + name: 'yardstick-params-intel-pod8' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -174,7 +338,7 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '' + default: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: @@ -182,7 +346,15 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '' + default: '-i 104.197.68.199: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: '-i 104.197.68.199:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: @@ -190,13 +362,80 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '-r 213.77.62.197' + default: '-i 104.197.68.199:8086' 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: '-i 104.197.68.199:8086' + description: 'Arguments to use in order to choose the backend DB' + +- parameter: + name: 'yardstick-params-huawei-us-deploy-bare-2' + parameters: + - string: + name: YARDSTICK_DB_BACKEND + default: '-i 104.197.68.199:8086' + 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: '-i 104.197.68.199:8086' + 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' + +- parameter: + name: 'yardstick-params-huawei-sh-test-2' + 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 * * *' + +- trigger: + name: 'yardstick-daily-huawei-sh-test-2-trigger' + triggers: + - timed: '0 1 * * *'