diff options
Diffstat (limited to 'jjb/yardstick/yardstick-ci-jobs.yml')
-rw-r--r-- | jjb/yardstick/yardstick-ci-jobs.yml | 83 |
1 files changed, 56 insertions, 27 deletions
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 87485c44f..56582c90a 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -23,6 +23,9 @@ # brahmaputra #-------------------------------- pod: + - opnfv-jump-1: + installer: apex + <<: *brahmaputra - opnfv-jump-2: installer: fuel <<: *brahmaputra @@ -53,6 +56,9 @@ - orange-pod2: installer: joid <<: *master + - opnfv-jump-1: + installer: apex + <<: *master #-------------------------------- loop: - daily @@ -70,7 +76,7 @@ wrappers: - build-name: - name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO' + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' parameters: - project-parameter: @@ -82,6 +88,10 @@ name: YARDSTICK_SUITE_NAME default: opnfv_${{NODE_NAME}}_{loop}.yaml description: 'Path to test suite' + - string: + name: CI_DEBUG + default: 'false' + description: "Show debut output information" scm: - git-scm: @@ -91,7 +101,7 @@ builders: - 'yardstick-cleanup' - - 'yardstick-fetch-os-creds' + #- 'yardstick-fetch-os-creds' - 'yardstick-daily' publishers: @@ -106,25 +116,37 @@ 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" + 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 + 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/}" # 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 >$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!" @@ -132,21 +154,21 @@ 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 @@ -156,7 +178,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 ######################## @@ -191,7 +214,7 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '' + default: '-i 10.118.36.90:8086' description: 'Arguments to use in order to choose the backend DB' - parameter: @@ -199,15 +222,21 @@ parameters: - string: name: YARDSTICK_DB_BACKEND - default: '' + 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' + default: '-r 213.77.62.197/results' description: 'Arguments to use in order to choose the backend DB' - parameter: |