
Remove docker `files` check. This check works only in `check` and `gate` steps, but is not functioning properly in `post` step and always fail resulting in not pushed images of monasca/base. Change-Id: Id960e831948ee87e078688e43b864b22a6ee11ae
20 lines
622 B
Bash
Executable File
20 lines
622 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x # Print each script step.
|
|
set -eo pipefail # Exit the script if any statement returns error.
|
|
|
|
REAL_PATH=$(python -c "import os,sys;print(os.path.realpath('$0'))")
|
|
cd "$(dirname "$REAL_PATH")/../docker/"
|
|
|
|
BASE_GIT_COMMIT=$(git rev-parse --verify HEAD)
|
|
[ -z "${BASE_GIT_COMMIT}" ] && echo "No git commit hash found" && exit 1
|
|
|
|
BASE_CREATION_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
: "${MONASCA_COMMON_TAG:="master"}"
|
|
|
|
docker build --no-cache \
|
|
--build-arg BASE_CREATION_TIME="$BASE_CREATION_TIME" \
|
|
--build-arg BASE_GIT_COMMIT="$BASE_GIT_COMMIT" \
|
|
--tag monasca/base:"$MONASCA_COMMON_TAG" .
|