ci: add deploy jobs for app targets

This commit is contained in:
Rainer Killinger
2022-02-18 15:50:59 +01:00
parent 7596759f77
commit 6a5bad7896

View File

@@ -2,12 +2,10 @@ image: docker:stable
stages:
- image
- deploy
docker image:
stage: image
only:
variables:
- $BUILD_IMAGE == "true"
variables:
DOCKER_DRIVER: overlay2
services:
@@ -16,7 +14,69 @@ docker image:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
- docker build -t registry.gitlab.com/openstapps/app-release-template .
- docker push registry.gitlab.com/openstapps/app-release-template
only:
- main
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $BUILD_IMAGE == "true"'
tags:
- docker
- docker
web:
image: registry.gitlab.com/openstapps/app-release-template
stage: deploy
script:
- >
if [ "$RELEASE_TYPE" == "staging" ]; then
echo "Handle staging artifact here";
fi
if [ "$RELEASE_TYPE" == "production" ]; then
echo "Handle production artifact here";
fi
artifacts:
untracked: false
paths:
- www.zip
tags:
- secrecy
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'
ios:
image: registry.gitlab.com/openstapps/app-release-template
stage: deploy
script:
- >
if [ "$RELEASE_TYPE" == "staging" ]; then
make ios-beta;
fi
if [ "$RELEASE_TYPE" == "production" ]; then
make ios;
fi
artifacts:
untracked: false
tags:
- secrecy
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'
android:
image: registry.gitlab.com/openstapps/app-release-template
stage: deploy
script:
- >
if [ "$RELEASE_TYPE" == "staging" ]; then
make android-beta;
fi
if [ "$RELEASE_TYPE" == "production" ]; then
make android;
fi
artifacts:
untracked: false
tags:
- secrecy
rules:
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "staging"'
- if: '$CI_COMMIT_BRANCH == "main" && $RELEASE_TYPE == "production"'