.gitlab-ci.yml 631 Bytes
Newer Older
1
image: jangrewe/gitlab-ci-android
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
2 3

before_script:
4
  - export GRADLE_USER_HOME=$(pwd)/.gradle
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
5
  - export BUILD_NUMBER=$(git rev-list --count ${CI_BUILD_REF})
6
  - export BUILD_COMMIT_SHA=${CI_COMMIT_SHA}
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
7 8
  - chmod +x ./gradlew

9 10 11 12 13
cache:
  key: ${CI_PROJECT_ID}
  paths:
    - .gradle/

Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
14
stages:
15
  - test
16 17 18 19 20 21 22 23 24
  - build

unitTests:
  stage: test
  script:
    - ./gradlew test
  only:
    - release
    - master
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
25 26 27 28 29 30

build:
  stage: build
  script:
    - ./gradlew assembleDebug
  artifacts:
31
    name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
32 33 34 35 36 37
    paths:
    - app/build/outputs/
  only:
    - develop
    - release
    - master