tghandbook/.drone.yml

152 lines
2.8 KiB
YAML
Raw Normal View History

2020-06-17 13:48:05 +00:00
---
2020-06-17 13:16:54 +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
commands:
- yarn
depends_on:
- restore-cache
- name: lint
image: node
commands:
- yarn lint
depends_on:
- dependencies
- name: build_versioned
image: node
commands:
- yarn build
2020-06-17 13:48:05 +00:00
environment:
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
2020-06-17 13:16:54 +00:00
when:
event:
- push
branch:
exclude:
- master
depends_on:
- dependencies
- name: build_pr
image: node
commands:
- yarn build
2020-06-17 13:48:05 +00:00
environment:
SUBPATH: /pr-${DRONE_PULL_REQUEST}
2020-06-17 13:16:54 +00:00
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
- name: upload_build_versioned
image: plugins/s3
settings:
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
target: /${DRONE_COMMIT_SHA:0:8}/
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- push
branch:
exclude:
- master
depends_on:
- build_versioned
- name: upload_build_pr
image: plugins/s3
settings:
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
target: /pr-${DRONE_PULL_REQUEST}/
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- pull_request
depends_on:
- build_pr
- name: upload_build_master
image: plugins/s3
settings:
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
target: /latest/
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- push
branch:
- master
depends_on:
- build_master
- name: rebuild-cache
image: drillster/drone-volume-cache
failure: ignore
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./node_modules
depends_on:
- dependencies
volumes:
- name: cache
host:
path: /opt/gitea/drone-cache/hamcha/tghandbook
2020-06-17 13:48:05 +00:00
---
kind: signature
2020-06-17 13:51:53 +00:00
hmac: bf5b70e01799ced73502bdb7b7296e4a4d3d32696af2dee54866d2cc24581f1d