node: ericsson-build
- logrotate:
- daysToKeep: 30
- numToKeep: 10
- artifactDaysToKeep: -1
- artifactNumToKeep: -1
-
parameters:
- project-parameter:
project: '{project}'
node: ericsson-build
- logrotate:
- daysToKeep: 30
- numToKeep: 40
- artifactDaysToKeep: -1
- artifactNumToKeep: 5
-
parameters:
- project-parameter:
project: '{project}'
refspec: ''
branch: master
- logrotate:
- daysToKeep: 30
- numToKeep: 10
- artifactDaysToKeep: -1
- artifactNumToKeep: -1
-
triggers:
- 'yardstick-trigger-{pod}'
builders:
+ - 'yardstick-cleanup'
- 'yardstick-fetch-os-creds'
- 'yardstick-daily'
echo "Yardstick: Run benchmark test suites ..."
- # Remove old containers
- docker ps | grep opnfv/yardstick-ci |\
- awk '{print $1}' | xargs -r docker stop &>/dev/null
- docker ps -a | grep opnfv/yardstick-ci |\
- awk '{print $1}' | xargs -r docker rm &>/dev/null
+ # Pull the latest image
+ docker pull opnfv/yardstick
- # Make sure we have latest image
- docker pull opnfv/yardstick-ci
+ # Test suites to run
+ TEST_SUITES=opnfv_${POD_NAME}_daily.yaml
docker run \
--privileged=true \
-t \
-e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
-e "INSTALLER_IP=${INSTALLER_IP}" \
- opnfv/yardstick-ci \
- run_benchmarks
+ -e "POD_NAME=${POD_NAME}" \
+ -e "EXTERNAL_NETWORK=net04_ext" \
+ opnfv/yardstick \
+ run_tests.sh \
+ $TEST_SUITES
echo "Yardstick: done!"
- shell:
!include-raw ../../utils/fetch_os_creds.sh
+- builder:
+ name: yardstick-cleanup
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ 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
+ 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
+ done
+ fi
+
########################
# parameter macros
########################