diff --git a/azure_deploy.sh b/azure_deploy.sh deleted file mode 100755 index d376282d..00000000 --- a/azure_deploy.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -npm install -npm run build - -python server/manage.py collectstatic --noinput -docker build --platform linux/amd64 -f compose/django/Dockerfile -t iterativ/vbv-lernwelt-django:azure . -docker image push iterativ/vbv-lernwelt-django:azure diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 0365e271..4e60ffd8 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -129,11 +129,17 @@ pipelines: name: prepare prod deployment script: - echo "Release ready!" - - step: - <<: *deploy - name: deploy prod - deployment: prod - trigger: manual + - parallel: + - step: + <<: *deploy + name: deploy prod + deployment: prod + trigger: manual + - step: + <<: *deploy + name: deploy prod-azure + deployment: prod-azure + trigger: manual custom: deploy-stage: - step: diff --git a/caprover_deploy.sh b/caprover_deploy.sh index ad5bdc50..7f0a0ba8 100755 --- a/caprover_deploy.sh +++ b/caprover_deploy.sh @@ -53,7 +53,13 @@ VERSION_TAG="${REPO}:$VERSION" docker build --platform=linux/amd64 -f compose/django/Dockerfile -t "$REPO" -t "$LATEST" -t "$VERSION_TAG" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" --build-arg GIT_COMMIT="$(git log -1 --format=%h)" . docker push "$VERSION_TAG" -# caprover specific stuff +if [[ "$APP_NAME" == "vbv-azure" ]]; then + # build and push azure docker container + docker build --platform linux/amd64 -f compose/django/Dockerfile -t iterativ/vbv-lernwelt-django:azure . + docker image push iterativ/vbv-lernwelt-django:azure +fi + +# caprover specific deployment APP_URL="$APP_NAME.control.iterativ.ch" echo "Checking if $APP_URL is available..."