Merge "Use global job for building docker image"

This commit is contained in:
Zuul 2019-03-04 13:37:26 +00:00 committed by Gerrit Code Review
commit 65a40ad899
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@
- release-notes-jobs-python3
check:
jobs:
- docker-build-monasca-service
- monasca-tempest-python2-influxdb:
voting: false
- monasca-tempest-python3-influxdb:

View File

@ -44,6 +44,10 @@ set -eo pipefail # Exit the script if any statement returns error.
# to provide it as in the following example:
# $ ./build_image.sh master master refs/changes/19/595719/3
# Go to folder with Docker files.
REAL_PATH=$(python -c "import os,sys; print(os.path.realpath('$0'))")
cd "$(dirname "$REAL_PATH")/../docker/"
[ -z "$DOCKER_IMAGE" ] && \
DOCKER_IMAGE=$(\grep DOCKER_IMAGE Dockerfile | cut -f2 -d"=")