2019-09-20 14:25:59 +00:00
|
|
|
---
|
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
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
|
|
|
- restore-cache
|
2019-09-06 14:32:05 +00:00
|
|
|
|
2019-09-20 13:03:56 +00:00
|
|
|
- name: lint
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- yarn lint
|
|
|
|
depends_on:
|
|
|
|
- dependencies
|
|
|
|
|
2019-09-10 10:20:31 +00:00
|
|
|
- name: build_versioned
|
2019-09-06 14:32:05 +00:00
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- yarn build
|
2019-09-10 10:20:31 +00:00
|
|
|
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
|
2019-09-09 12:27:45 +00:00
|
|
|
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
|
2019-09-09 12:27:45 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
depends_on:
|
2019-09-10 10:20:31 +00:00
|
|
|
- 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
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
2019-09-10 10:20:31 +00:00
|
|
|
- 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:
|
2019-09-09 12:27:45 +00:00
|
|
|
event:
|
|
|
|
- push
|
2019-09-06 14:32:05 +00:00
|
|
|
branch:
|
|
|
|
- master
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
2019-09-10 10:20:31 +00:00
|
|
|
- build_master
|
2019-09-06 14:32:05 +00:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: node
|
|
|
|
commands:
|
2019-09-16 13:53:07 +00:00
|
|
|
- yarn test:unit --runInBand
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
|
|
|
- dependencies
|
2019-09-06 14:32:05 +00:00
|
|
|
|
|
|
|
- name: coverage
|
|
|
|
image: node
|
|
|
|
commands:
|
2019-09-16 13:53:07 +00:00
|
|
|
- yarn test:unit --coverage --runInBand
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
2019-09-12 09:11:32 +00:00
|
|
|
- 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
|
2019-09-09 12:27:45 +00:00
|
|
|
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
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
|
|
|
- coverage
|
2019-09-06 14:32:05 +00:00
|
|
|
|
|
|
|
- name: rebuild-cache
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
settings:
|
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- ./node_modules
|
2019-09-09 12:27:45 +00:00
|
|
|
depends_on:
|
|
|
|
- dependencies
|
2019-09-20 13:20:47 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
2019-09-20 13:24:43 +00:00
|
|
|
host:
|
|
|
|
path: /data/dcache/mcg
|
2019-09-20 14:25:59 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
|
|
|
hmac: b7a02d5e55b3ee9b55c43937b458ae8bcef04e1654fccc092f3b5fea2253b784
|