Add yarn cache to drone
This commit is contained in:
parent
ec29cd90e6
commit
6f458b7628
44
.drone.yml
44
.drone.yml
@ -12,10 +12,32 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
|
|
||||||
|
- name: restore-cache
|
||||||
|
image: meltwater/drone-cache:dev
|
||||||
|
pull: true
|
||||||
|
environment:
|
||||||
|
AWS_ACCESS_KEY_ID:
|
||||||
|
from_secret: cache_aws_access_key_id
|
||||||
|
AWS_SECRET_ACCESS_KEY:
|
||||||
|
from_secret: cache_aws_secret_access_key
|
||||||
|
settings:
|
||||||
|
restore: true
|
||||||
|
bucket: kolaente.dev-drone-dependency-cache
|
||||||
|
endpoint: https://s3.fr-par.scw.cloud
|
||||||
|
region: fr-par
|
||||||
|
path_style: true
|
||||||
|
cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||||
|
mount:
|
||||||
|
- '.cache'
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: electronuserland/builder:wine
|
image: electronuserland/builder:wine
|
||||||
pull: true
|
pull: true
|
||||||
depends_on: [ fetch-tags ]
|
environment:
|
||||||
|
YARN_CACHE_FOLDER: .cache/yarn/
|
||||||
|
depends_on:
|
||||||
|
- fetch-tags
|
||||||
|
- restore-cache
|
||||||
commands:
|
commands:
|
||||||
- export VERSION=${DRONE_TAG##v}
|
- export VERSION=${DRONE_TAG##v}
|
||||||
- if [ -z "$$VERSION" ]; then export VERSION=${DRONE_BRANCH}; fi
|
- if [ -z "$$VERSION" ]; then export VERSION=${DRONE_BRANCH}; fi
|
||||||
@ -28,6 +50,26 @@ steps:
|
|||||||
- yarn install
|
- yarn install
|
||||||
- yarn dist --linux --windows
|
- yarn dist --linux --windows
|
||||||
|
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: meltwater/drone-cache:dev
|
||||||
|
pull: true
|
||||||
|
environment:
|
||||||
|
AWS_ACCESS_KEY_ID:
|
||||||
|
from_secret: cache_aws_access_key_id
|
||||||
|
AWS_SECRET_ACCESS_KEY:
|
||||||
|
from_secret: cache_aws_secret_access_key
|
||||||
|
settings:
|
||||||
|
rebuild: true
|
||||||
|
bucket: kolaente.dev-drone-dependency-cache
|
||||||
|
endpoint: https://s3.fr-par.scw.cloud
|
||||||
|
region: fr-par
|
||||||
|
path_style: true
|
||||||
|
cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||||
|
mount:
|
||||||
|
- '.cache'
|
||||||
|
depends_on:
|
||||||
|
- build
|
||||||
|
|
||||||
- name: release-latest
|
- name: release-latest
|
||||||
image: plugins/s3:1
|
image: plugins/s3:1
|
||||||
pull: true
|
pull: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user