mlpcardgame/.drone.yml

197 lines
3.8 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
failure: ignore
2019-09-06 14:32:05 +00:00
commands:
- yarn
depends_on:
- restore-cache
2019-09-06 14:32:05 +00:00
- name: lint
image: node
commands:
- yarn lint
depends_on:
- dependencies
- name: build_versioned
2019-09-06 14:32:05 +00:00
image: node
commands:
- yarn build
environment:
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
when:
event:
- push
depends_on:
- dependencies
- name: build_pr
image: node
commands:
- yarn build
environment:
SUBPATH: /pr-${DRONE_PULL_REQUEST}
when:
event:
- pull_request
depends_on:
- dependencies
- name: build_master
image: node
commands:
- yarn build
environment:
SUBPATH: /latest
when:
event:
- push
branch:
- master
depends_on:
- dependencies
2019-09-06 14:32:05 +00:00
- 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
when:
event:
- push
depends_on:
- build_versioned
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
depends_on:
- build_pr
2019-09-06 14:32:05 +00:00
- 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:
event:
- push
2019-09-06 14:32:05 +00:00
branch:
- master
depends_on:
- build_master
2019-09-06 14:32:05 +00:00
- name: test
image: node
commands:
- yarn test:unit --runInBand
depends_on:
- dependencies
2019-09-06 14:32:05 +00:00
- name: coverage
image: node
commands:
- yarn test:unit --coverage --runInBand
depends_on:
- test # Must run after test otherwise SQLite will get mad
2019-09-06 14:32:05 +00:00
- 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
when:
event:
- push
depends_on:
- coverage
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
depends_on:
- coverage
2019-09-06 14:32:05 +00:00
- name: rebuild-cache
image: drillster/drone-volume-cache
failure: ignore
2019-09-06 14:32:05 +00:00
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./node_modules
depends_on:
- dependencies
volumes:
- name: cache
host:
path: /opt/gitea/drone-cache/mcg/mlpcardgame
---
kind: signature
hmac: 6aee8b5c1125f8f2fe31f5e927f8007084b0226979e27825336191bf76275fa3
...