stages: - build - test - staging - prod build-android: stage: build tags: - android - gitlab-org - gitlab-org-docker - docker image: walljm/gradle_android:8.0.2-jdk17-33-node1 before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - node -v - npm -v - npm ci - npm run-script build - npm run-script copy - cd android/ - gradle signingReport - gradle assembleRelease - gradle bundleRelease artifacts: paths: - ./src/dist - ./src/android/app/build/outputs test: stage: test tags: - android - gitlab-org - gitlab-org-docker - docker image: walljm/node-chrome-headless:21.6 variables: NODE_OPTIONS: "--max_old_space_size=2048" script: - cd ./src - npm ci - npm run-script lint - npm run-script test-headless needs: - build-android deploy-staging: stage: staging tags: - docker - gitlab-org - gitlab-org-docker - docker - small-docker image: google/cloud-sdk script: - cd ./src - make deploy-staging rules: - if: '$CI_COMMIT_BRANCH == "main"' when: on_success allow_failure: false needs: - build-android deploy-prod-site: stage: prod tags: - docker - gitlab-org - gitlab-org-docker - docker - small-docker image: google/cloud-sdk script: - cd ./src - make deploy-prod rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false needs: - build-android deploy-android: stage: prod tags: - android - gitlab-org - gitlab-org-docker - docker image: walljm/gradle_android:8.0.2-jdk17-33-node1 needs: - build-android before_script: - cd ./src/android - bash ./install-sdk.sh - cd .. script: - pwd - node -v - npm -v - npm ci - npm run-script build - npm run-script copy - cd android/ - gradle signingReport - gradle assembleRelease - gradle bundleRelease - gradle publishReleaseBundle artifacts: paths: - ./src/android/app/build/outputs rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manual allow_failure: false