Add yarn cache to drone #312

Merged
konrad merged 8 commits from feature/yarn-cache into master 2020-12-06 17:45:45 +00:00
1 changed files with 73 additions and 0 deletions
Showing only changes of commit 209d95f861 - Show all commits

View File

@ -11,20 +11,57 @@ trigger:
- pull_request
steps:
- name: restore-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
pull: true
settings:
restore: true
bucket: kolaente.dev-drone-cache
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
mount:
- '/cache'
- name: build
image: node:13
pull: true
group: build-static
environment:
YARN_CACHE_FOLDER: /cache
commands:
- yarn --frozen-lockfile --network-timeout 100000
- yarn run lint
- yarn run build
- name: test
image: node:13
pull: true
group: build-static
commands:
- yarn test
- name: rebuild-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
pull: true
settings:
rebuild: true
bucket: kolaente.dev-drone-cache
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
mount:
- '/cache'
---
kind: pipeline
name: release-latest
@ -41,10 +78,29 @@ steps:
commands:
- git fetch --tags
- name: restore-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
pull: true
settings:
restore: true
bucket: kolaente.dev-drone-cache
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
mount:
- '/cache'
- name: build
image: node:13
pull: true
group: build-static
environment:
YARN_CACHE_FOLDER: /cache
commands:
- yarn --frozen-lockfile --network-timeout 100000
- yarn run lint
@ -91,6 +147,23 @@ steps:
commands:
- git fetch --tags
- name: restore-cache
image: meltwater/drone-cache:dev
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
pull: true
settings:
restore: true
bucket: kolaente.dev-drone-cache
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
mount:
- '/cache'
- name: build
image: node:13
pull: true