Use global job for building docker image

Change-Id: Iaa832b5de5f7e8a0f6bcd44513f675195d4a897e
Story: 2001694
Task: 23214
This commit is contained in:
Dobroslaw Zybort 2019-02-18 11:13:45 +01:00
parent 5f21b325ba
commit e35d32ad8d
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,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"=")