Skip to content

Instantly share code, notes, and snippets.

@xuhaibahmad
Created January 29, 2017 10:34
Show Gist options
  • Save xuhaibahmad/2a8174587c8aa590b9320e1d5de4fd56 to your computer and use it in GitHub Desktop.
Save xuhaibahmad/2a8174587c8aa590b9320e1d5de4fd56 to your computer and use it in GitHub Desktop.
Gitlab CI config file
image: jangrewe/gitlab-ci-android
stages:
- build
- test
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:prod:
stage: build
script:
- ./gradlew assembleProdDebug
artifacts:
paths:
- app/build/outputs/apk/app-prod-debug.apk
build:dev:
stage: build
script:
- ./gradlew assembleDevDebug
artifacts:
paths:
- app/build/outputs/apk/app-dev-debug.apk
unitTests:prod:
stage: test
script:
- ./gradlew testProdDebug
unitTests:dev:
stage: test
script:
- ./gradlew testDevDebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment