Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into fix/dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
scherniavsky authored Jun 14, 2018
2 parents 2a6331b + cc229f5 commit d141b7e
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,24 @@ pipeline:
event: push
branch: master
commands:
- desc: Install Docker
- desc: Build, test & push the Docker image
cmd: |
# Docker
curl -fLOsS https://delivery.cloud.zalando.com/utils/ensure-docker && sh ensure-docker && rm ensure-docker
- desc: Build docker image
cmd: |
GIT_TAG=$(git describe --tags --always --dirty)
IMAGE=registry-write.opensource.zalan.do/tip/docker-locust:$GIT_TAG
export GIT_TAG=$(git describe --tags --always --dirty)
export IMAGE=registry-write.opensource.zalan.do/tip/docker-locust:$GIT_TAG
echo "Image: $IMAGE"
echo "Build docker image"
docker build -t $IMAGE --build-arg DL_IMAGE_VERSION=$GIT_TAG .
- desc: Run smoke test
cmd: |
echo "Deploy image locally and run simple scenario"
./local.sh deploy --target=https://google.com --locust-file=./example/simple.py --slaves=2 --mode=auto --users=2 --hatch-rate=1 --duration=5
# check if json report exists and has non-zero size
[ -s reports/requests.json ] || exit 1
# check if html report exists and has non-zero size
[ -s reports/reports.html ] || exit 1
# check if RPS value is greater than 0
cat reports/reports.html | grep 'RPS:' | cut -c 17- | awk -F'</strong' '{print ($1>0)}' | grep 1 || exit 1
- desc: Push docker image
cmd: |
echo "Push docker image"
docker push $IMAGE
# Smoke test
echo "Deploy image locally and run simple scenario"
./local.sh deploy --target=https://google.com --locust-file=./example/simple.py --slaves=2 --mode=auto --users=2 --hatch-rate=1 --duration=5
# check if json report exists and has non-zero size
[ -s reports/requests.json ] || exit 1
# check if html report exists and has non-zero size
[ -s reports/reports.html ] || exit 1
# check if RPS value is greater than 0
cat reports/reports.html | grep 'RPS:' | cut -c 17- | awk -F'</strong' '{print ($1>0)}' | grep 1 || exit 1
# Push docker image
echo "Push docker image"
docker push $IMAGE

0 comments on commit d141b7e

Please sign in to comment.