[CI] Docker image now has gradle cache for faster CI
This commit is contained in:
parent
f634bcab9f
commit
adc8c05014
|
@ -3,25 +3,12 @@ image: hatsoftwares/mastalab-ci:latest
|
||||||
before_script:
|
before_script:
|
||||||
- export ANDROID_HOME=/opt/android-sdk-linux
|
- export ANDROID_HOME=/opt/android-sdk-linux
|
||||||
- export PATH=$PATH:/opt/android-sdk-linux/platform-tools/
|
- export PATH=$PATH:/opt/android-sdk-linux/platform-tools/
|
||||||
- export GRADLE_USER_HOME=$(pwd)/.gradle/
|
|
||||||
- chmod +x gradlew
|
- chmod +x gradlew
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- prepare
|
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
prepare:
|
|
||||||
stage: prepare
|
|
||||||
script:
|
|
||||||
- ./gradlew tasks
|
|
||||||
cache:
|
|
||||||
key: "$CI_COMMIT_SHA"
|
|
||||||
paths:
|
|
||||||
- app/build/outputs/
|
|
||||||
- .gradle/
|
|
||||||
policy: push
|
|
||||||
|
|
||||||
assembleDebug:
|
assembleDebug:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
@ -30,7 +17,7 @@ assembleDebug:
|
||||||
key: "$CI_COMMIT_SHA"
|
key: "$CI_COMMIT_SHA"
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs/
|
- app/build/outputs/
|
||||||
- .gradle/
|
policy: push
|
||||||
|
|
||||||
lintDebug:
|
lintDebug:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -38,10 +25,9 @@ lintDebug:
|
||||||
key: "$CI_COMMIT_SHA"
|
key: "$CI_COMMIT_SHA"
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs/
|
- app/build/outputs/
|
||||||
- .gradle/
|
|
||||||
policy: pull
|
policy: pull
|
||||||
script:
|
script:
|
||||||
- ./gradlew --stacktrace -Pci --console=plain :app:lintFdroidDebug -PbuildDir=lint
|
- ./gradlew -Pci --console=plain :app:lintFdroidDebug -PbuildDir=lint
|
||||||
|
|
||||||
debugTests:
|
debugTests:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -49,7 +35,6 @@ debugTests:
|
||||||
key: "$CI_COMMIT_SHA"
|
key: "$CI_COMMIT_SHA"
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs/
|
- app/build/outputs/
|
||||||
- .gradle/
|
|
||||||
policy: pull
|
policy: pull
|
||||||
script:
|
script:
|
||||||
- ./gradlew --stacktrace -Pci --console=plain :app:testFdroidDebugUnitTest
|
- ./gradlew -Pci --console=plain :app:testFdroidDebugUnitTest
|
||||||
|
|
Loading…
Reference in New Issue