diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a57f1f0..56e27638 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file + - 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"'