image: ${CI_REGISTRY}/protonvpn/android/android-app-new:branch-compose include: - project: 'agarroux/publish-github' ref: master file: '/jobs/release.gitlab-ci.yml' - project: 'translations/generator' ref: master file: '/jobs/sync-crowdin.gitlab-ci.yml' - project: 'translations/generator' ref: master file: '/jobs/commit-locales.gitlab-ci.yml' - project: 'ProtonVPN/android/android-app-new' ref: development file: '/appetize-integration.yml' stages: - bot - analyze - build - test - report - publish - commit - slackRelease variables: # Use fastzip to improve cache times FF_USE_FASTZIP: "true" # Output upload and download progress every 5 seconds TRANSFER_METER_FREQUENCY: "5s" # Use no compression for artifacts ARTIFACT_COMPRESSION_LEVEL: "fastest" # Use low compression for caches CACHE_COMPRESSION_LEVEL: "fast" cache: &global_cache key: ${CI_COMMIT_REF_SLUG} paths: - .gradle/caches/modules-* - .gradle/caches/jars-* - ./**/build ##################### danger-review: image: ruby:2.7 stage: .post when: always tags: - small script: - bundle config set path 'vendor/ruby' - bundle config set without 'production' - bundle install - bundle exec danger --fail-on-errors=false cache: key: files: - Gemfile.lock paths: - vendor/ruby allow_failure: true variables: DANGER_GITLAB_API_TOKEN: $DANGER_GITLAB_API_TOKEN interruptible: true detekt analyze: stage: analyze when: always tags: - medium interruptible: true script: - ./gradlew multiModuleDetekt artifacts: expire_in: 1 month reports: codequality: config/detekt/reports/mergedReport.json assemble: stage: build tags: - large interruptible: true script: - echo PROXY_TOKEN="$(curl -o - https://proxy.proton.black/token/get)" >> local.properties - echo HOST="proton.black" >> local.properties - ./gradlew assembleDebug artifacts: paths: - coreexample/build/outputs/ debugTests: stage: test tags: - large interruptible: true script: - ./gradlew -Pci --console=plain allTest uiTests: stage: test when: manual trigger: strategy: depend include: - local: coreexample/ci/test.coreexample.uitests.yml release-publish-github: stage: publish tags: - small only: - master variables: RELEASE_SYNC_PUBLIC_URL: git@github.com:ProtonMail/protoncore_android.git RELEASE_SYNC_TO_BRANCH: 'master' RELEASE_SYNC_FROM_BRANCH: 'master' extends: .release-sync-commit-shared publishMaven: stage: publish tags: - large script: - ./gradlew publishNewRelease --no-daemon --no-parallel only: - master artifacts: expire_in: 10 days paths: - new_releases.tmp - releases - docs - README.md publishGradlePortal: stage: publish tags: - small script: - ./gradlew -p plugins assemble && ./gradlew -p plugins publishAll only: - master artifacts: expire_in: 10 days paths: - new_releases.tmp - releases - docs - README.md commitRelease: stage: commit tags: - small needs: - job: publishMaven artifacts: true script: - ./util/commitRelease only: - master postReleaseToSlack: stage: slackRelease tags: - small needs: - job: publishMaven artifacts: true script: - ./util/postReleaseToSlack only: - master i18n-sync-crowdin: extends: .i18n-sync-crowdin-common variables: I18N_SYNC_CROWDIN_PROJECT: 'android-core' I18N_SYNC_BRANCH: 'master' I18N_FILTER_OUT_ITEMS: 'coreexample' i18n-commit-locales: extends: .i18n-commit-locales-shared variables: I18N_COMMIT_CROWDIN_PROJECT: 'android-core' I18N_COMMIT_BRANCH_PUSH: 'master' I18N_COMMIT_BRANCH_ALLOWED: 'master' startReview: before_script: - export REVIEW_APP_ARTIFACT_PATH="coreexample/build/outputs/apk/debug/coreexample-debug.apk" extends: .startReview stage: test stopReview: extends: .stopReview coverage report: stage: report tags: - medium script: - ./gradlew coberturaCoverageReport coverage: /Total.*?(\d{1,3}\.\d{0,2})%/ allow_failure: true interruptible: true cache: <<: *global_cache policy: pull artifacts: expire_in: 1 week paths: - ./build/reports/* reports: cobertura: - ./build/reports/cobertura-coverage.xml