diff --git a/scripts/build_container.sh b/scripts/build_container.sh index 4af055b..0af509b 100755 --- a/scripts/build_container.sh +++ b/scripts/build_container.sh @@ -5,6 +5,7 @@ set -euo pipefail THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}") THIS_DIR=$(dirname "$THIS_FILE") ROOT_DIR=$(dirname "$THIS_DIR") +WORKSPACE_DIR="$(dirname "$ROOT_DIR")" . "$THIS_DIR/kash/kash.sh" @@ -20,6 +21,7 @@ while getopts "pr:" option; do ;; r) # report outcome to slack CI_STEP_NAME=$OPTARG + load_env_files "$WORKSPACE_DIR/development/common/SLACK_WEBHOOK_TOOLS.enc.env" trap 'slack_ci_report "$ROOT_DIR" "$CI_STEP_NAME" "$?" "$SLACK_WEBHOOK_TOOLS"' EXIT ;; *) @@ -30,25 +32,24 @@ done ## Init workspace ## -WORKSPACE_DIR="$(dirname "$ROOT_DIR")" GIT_TAG=$(get_git_tag "$ROOT_DIR") -load_env_files "$WORKSPACE_DIR/development/common/kalisio_dockerhub.enc.env" "$WORKSPACE_DIR/development/common/SLACK_WEBHOOK_TOOLS.enc.env" +load_env_files "$WORKSPACE_DIR/development/common/kalisio_dockerhub.enc.env" load_value_files "$WORKSPACE_DIR/development/common/KALISIO_DOCKERHUB_PASSWORD.enc.value" ## Build container ## -IMAGE_NAME="kalisio/kdk-keycloak-themes" +IMAGE_NAME="$KALISIO_DOCKERHUB_URL/kalisio/kdk-keycloak-themes" if [[ -z "$GIT_TAG" ]]; then IMAGE_TAG=latest else IMAGE_TAG=$GIT_TAG fi -begin_group "Building container ${IMAGE_NAME}:${IMAGE_TAG}" +begin_group "Building container $IMAGE_NAME:$IMAGE_TAG ..." -docker login --username "$KALISIO_DOCKERHUB_USERNAME" --password-stdin < "$KALISIO_DOCKERHUB_PASSWORD" +docker login --username "$KALISIO_DOCKERHUB_USERNAME" --password-stdin "$KALISIO_DOCKERHUB_URL" < "$KALISIO_DOCKERHUB_PASSWORD" # DOCKER_BUILDKIT is here to be able to use Dockerfile specific dockerginore (app.Dockerfile.dockerignore) DOCKER_BUILDKIT=1 docker build \ -f Dockerfile \ @@ -59,6 +60,6 @@ if [ "$PUBLISH" = true ]; then docker push "$IMAGE_NAME:$IMAGE_TAG" fi -docker logout +docker logout "$KALISIO_DOCKERHUB_URL" -end_group "Building container ..." +end_group "Building container $IMAGE_NAME:$IMAGE_TAG ..." diff --git a/scripts/kash b/scripts/kash index e884b6d..d8245ef 160000 --- a/scripts/kash +++ b/scripts/kash @@ -1 +1 @@ -Subproject commit e884b6d7f7812d9f6fb744b516516b31bc2a9598 +Subproject commit d8245efeab5ed00a5f4691e5a06dec0f887dacac diff --git a/scripts/setup_workspace.sh b/scripts/setup_workspace.sh index a72ac03..71342e8 100755 --- a/scripts/setup_workspace.sh +++ b/scripts/setup_workspace.sh @@ -8,9 +8,6 @@ ROOT_DIR=$(dirname "$THIS_DIR") . "$THIS_DIR/kash/kash.sh" -WORKSPACE_BRANCH= -WORKSPACE_TAG= - begin_group "Setting up workspace ..." if [ "$CI" = true ]; then