mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-05 13:02:54 +00:00
ci: add deploy jobs for app targets
This commit is contained in:
@@ -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"'
|
||||
|
||||
Reference in New Issue
Block a user