changed tag handling

This commit is contained in:
André Bauer 2019-02-15 16:52:40 +01:00
parent 5aa5151c88
commit ed29aaa96c
3 changed files with 5 additions and 4 deletions

View File

@ -134,7 +134,6 @@ if [ "$1" = 'zammad-railsserver' ]; then
fi fi
# zammad-scheduler # zammad-scheduler
if [ "$1" = 'zammad-scheduler' ]; then if [ "$1" = 'zammad-scheduler' ]; then
check_zammad_ready check_zammad_ready

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/usr/bin/env bash
set -e set -e
# install dependencies # install dependencies

View File

@ -3,10 +3,11 @@
# build hook for dockerhubs autobuild feature # build hook for dockerhubs autobuild feature
# #
set -ex set -e
. "hooks/config" . "hooks/config"
#shellcheck disable=SC2153
for DOCKER_IMAGE in ${DOCKER_IMAGES}; do for DOCKER_IMAGE in ${DOCKER_IMAGES}; do
if [ "${TRAVIS}" == 'true' ] || [ "${CIRCLECI}" == 'true' ]; then 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" 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}
docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-latest
if [ "${ZAMMAD_VERSION}" != "latest" ]; then if [ "${ZAMMAD_VERSION}" != "latest" ]; then
docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${ZAMMAD_VERSION} docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${ZAMMAD_VERSION}