fixed docker repo
Signed-off-by: André Bauer <andre.bauer@kiwigrid.com>
This commit is contained in:
parent
de15ce2cdf
commit
413d8eb03b
1 changed files with 10 additions and 6 deletions
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue