1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2025-07-08 09:46:23 +00:00

Refactor challenge building to libhack

This commit is contained in:
Kristóf Tóth
2018-06-15 15:18:46 +02:00
parent f563022aa8
commit 35776e7d7f
3 changed files with 86 additions and 69 deletions

View File

@ -2,6 +2,7 @@
# - BASEIMAGE_PATH: absolute path of baseimage repo
BASEIMAGE_NAME="${BASEIMAGE_NAME:-eu.gcr.io/avatao-challengestore/tutorial-framework}"
libhack_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
source "${libhack_dir}/common.sh"
@ -20,6 +21,10 @@ baseimage::build() {
popd
}
baseimage::build_if_exists() {
[[ -d "$BASEIMAGE_PATH" ]] && baseimage::build_as_latest
}
baseimage::tag_as_latest() {
docker tag "${BASEIMAGE_NAME}:$(releasename)" "${BASEIMAGE_NAME}:latest"
}