mlpcardgame/.drone.yml

126 lines
2.5 KiB
YAML
Raw Normal View History

2019-09-06 14:32:05 +00:00
kind: pipeline
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./node_modules
- name: dependencies
image: node
commands:
- yarn
- name: build
image: node
commands:
- yarn build
- name: upload_build_versioned
image: plugins/s3
settings:
bucket: mcg
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
2019-09-06 14:42:04 +00:00
target: /${DRONE_COMMIT_SHA:0:8}/
2019-09-06 14:32:05 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
2019-09-09 12:20:21 +00:00
when:
event:
- push
2019-09-06 14:32:05 +00:00
- name: upload_build_pr
image: plugins/s3
settings:
bucket: mcg
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
2019-09-06 14:42:04 +00:00
target: /pr-${DRONE_PULL_REQUEST}/
2019-09-06 14:32:05 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- pull_request
- name: upload_build_master
image: plugins/s3
settings:
bucket: mcg
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
2019-09-06 14:42:04 +00:00
target: /latest/
2019-09-06 14:32:05 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
2019-09-09 12:20:21 +00:00
event:
- push
2019-09-06 14:32:05 +00:00
branch:
- master
- name: test
image: node
commands:
- yarn test:unit
- name: coverage
image: node
commands:
- yarn test:unit --coverage
- name: upload_coverage
image: plugins/s3
settings:
bucket: mcg
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: coverage/lcov-report/**/*
2019-09-06 14:42:04 +00:00
target: /${DRONE_COMMIT_SHA:0:8}/
2019-09-06 14:32:05 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
2019-09-09 12:20:21 +00:00
when:
event:
- push
2019-09-06 14:32:05 +00:00
- name: upload_coverage_pr
image: plugins/s3
settings:
bucket: mcg
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: coverage/lcov-report/**/*
2019-09-06 14:52:33 +00:00
target: /pr-${DRONE_PULL_REQUEST}/
2019-09-06 14:32:05 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- pull_request
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./node_modules