Enable Drone CI cache (#424)
continuous-integration/drone/push Build is passing Details

## What changes were proposed in this pull request?

 Enable Drone CI cache.

## How was this patch tested?

CI/CD.

Reviewed-on: #424
Co-authored-by: Amab <juanmi1982@gmail.com>
Co-committed-by: Amab <juanmi1982@gmail.com>
This commit is contained in:
Amab 2023-10-21 21:42:32 +02:00 committed by Marown
parent caad081edb
commit a3beeeebef
1 changed files with 30 additions and 0 deletions

View File

@ -1,7 +1,19 @@
kind: pipeline
type: docker
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- .gradle/caches
- .gradle/wrapper
volumes:
- name: cache
path: /cache
- name: fetch-tags
image: drone/git:latest
commands:
@ -10,6 +22,8 @@ steps:
- name: build & test
image: git.cuernodehipnos.es/marown/android-sdk-docker:latest
privileged: true
environment:
GRADLE_USER_HOME: /drone/src/.gradle
commands:
# Create and run emulator
- echo "no" | avdmanager --verbose create avd --force --name "generic_34" --package "system-images;android-34;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
@ -26,3 +40,19 @@ steps:
# from_secret: sonar_host
# sonar_token:
# from_secret: sonar_token
- name: rebuild-cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- .gradle/caches
- .gradle/wrapper
volumes:
- name: cache
path: /cache
volumes:
- name: cache
host:
path: /share/CACHEDEV1_DATA/homes/admin/drone/cache