From ed29aaa96cb17e95a4d5e5f27ab93a1e347ecadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Fri, 15 Feb 2019 16:52:40 +0100 Subject: [PATCH] changed tag handling --- containers/zammad/docker-entrypoint.sh | 1 - containers/zammad/setup.sh | 2 +- hooks/build | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index 3d66b13..9610541 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -134,7 +134,6 @@ if [ "$1" = 'zammad-railsserver' ]; then fi - # zammad-scheduler if [ "$1" = 'zammad-scheduler' ]; then check_zammad_ready diff --git a/containers/zammad/setup.sh b/containers/zammad/setup.sh index cb94feb..bec1157 100644 --- a/containers/zammad/setup.sh +++ b/containers/zammad/setup.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e # install dependencies diff --git a/hooks/build b/hooks/build index bc588b8..17f3d91 100755 --- a/hooks/build +++ b/hooks/build @@ -3,10 +3,11 @@ # build hook for dockerhubs autobuild feature # -set -ex +set -e . "hooks/config" +#shellcheck disable=SC2153 for DOCKER_IMAGE in ${DOCKER_IMAGES}; do if [ "${TRAVIS}" == 'true' ] || [ "${CIRCLECI}" == 'true' ]; then @@ -18,9 +19,10 @@ for DOCKER_IMAGE in ${DOCKER_IMAGES}; do echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${ZAMMAD_VERSION} for DockerHubs ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} repo" - docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} ${DOCKER_TAG} -f containers/${DOCKER_IMAGE}/Dockerfile . + docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} -t ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-latest ${DOCKER_TAG} -f containers/${DOCKER_IMAGE}/Dockerfile . docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} + docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-latest if [ "${ZAMMAD_VERSION}" != "latest" ]; then docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${ZAMMAD_VERSION}