From 413d8eb03b77293bf3607ff58f47dd3073846f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 12 Feb 2019 12:39:03 +0100 Subject: [PATCH] fixed docker repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- .circleci/docker-image-build.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.circleci/docker-image-build.sh b/.circleci/docker-image-build.sh index b744ad6ff..3ecb64a33 100755 --- a/.circleci/docker-image-build.sh +++ b/.circleci/docker-image-build.sh @@ -6,16 +6,20 @@ set -o errexit set -o pipefail REPO_ROOT="$(git rev-parse --show-toplevel)" -REPO_USER="zammad" +GITHUB_REPO_USER="zammad" ZAMMAD_VERSION="$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')" export ZAMMAD_VERSION if [ "${CIRCLE_BRANCH}" == 'develop' ]; then - DOCKER_REPOSITORY="zammad-docker" BUILD_SCRIPT="scripts/build_image.sh" + DOCKER_REPOSITORY="zammad" + export DOCKER_REPOSITORY + GITHUB_REPOSITORY="zammad-docker" elif [ "${CIRCLE_BRANCH}" == 'stable' ]; then - DOCKER_REPOSITORY="zammad-docker-compose" BUILD_SCRIPT="hooks/build.sh" + DOCKER_REPOSITORY="zammad-docker-compose" + export DOCKER_REPOSITORY + GITHUB_REPOSITORY="zammad-docker-compose" else echo "branch is ${CIRCLE_BRANCH}... no docker image build needed..." exit 0 @@ -25,11 +29,11 @@ fi echo "${DOCKER_PASSWORD}" | docker login --username="${DOCKER_USERNAME}" --password-stdin # clone docker repo -git clone https://github.com/"${REPO_USER}"/"${DOCKER_REPOSITORY}" +git clone https://github.com/"${GITHUB_REPO_USER}"/"${GITHUB_REPOSITORY}" # enter dockerfile dir -cd "${REPO_ROOT}/${DOCKER_REPOSITORY}" +cd "${REPO_ROOT}/${GITHUB_REPOSITORY}" # build & push docker image # shellcheck disable=SC1090 -source "${REPO_ROOT}/${DOCKER_REPOSITORY}/${BUILD_SCRIPT}" +source "${REPO_ROOT}/${GITHUB_REPOSITORY}/${BUILD_SCRIPT}"