Skip to content

Instantly share code, notes, and snippets.

@pratamawijaya
Created November 17, 2016 13:56
Show Gist options
  • Save pratamawijaya/86013c6fb9b941c863a34e7d84877483 to your computer and use it in GitHub Desktop.
Save pratamawijaya/86013c6fb9b941c863a34e7d84877483 to your computer and use it in GitHub Desktop.
CI Gitlab Android
image: pratamawijaya/gitlab-ci-android
stages:
- check
- build
- deploy
before_script:
- export GRADLE_USER_HOME=/cache/.gradle
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
#job untuk checking
check:
stage: check
only:
- develop
script:
- ./gradlew --stacktrace clean assembleDebug
#job untuk build
build:
stage: build
only:
- develop
script:
- ./gradlew --stacktrace clean assembleRelease crashlyticsUploadDistributionRelease
artifacts:
paths:
- app/build/outputs/apk
#job untuk deploy
deploy:
stage: deploy
only:
- master
script:
- ./gradlew --stacktrace clean assembleRelease crashlyticsUploadDistributionRelease
artifacts:
paths:
- app/build/outputs/apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment