tghandbook/.drone.yml

128 lines
2.5 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:
2022-05-10 14:36:08 +00:00
- npm ci
2020-06-17 13:16:54 +00:00
depends_on:
- restore-cache
- name: lint
image: node
commands:
2022-05-10 14:36:08 +00:00
- npm run lint
2020-06-17 13:16:54 +00:00
depends_on:
- dependencies
2022-05-10 14:38:16 +00:00
- name: build
2020-06-17 13:16:54 +00:00
image: node
commands:
2022-05-10 14:36:08 +00:00
- npm run build
2020-06-17 13:48:05 +00:00
environment:
2022-05-10 10:27:27 +00:00
VITE_SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}
VITE_APP_REVISION: ${DRONE_COMMIT_SHA}
2020-06-17 13:16:54 +00:00
when:
event:
2022-05-10 14:38:16 +00:00
include:
- push
- pull_request
2020-06-17 13:16:54 +00:00
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/**/*
2020-06-18 12:20:29 +00:00
target: /${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}/
strip_prefix: dist/
2020-06-17 13:16:54 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- push
depends_on:
2022-05-10 14:38:16 +00:00
- build
2020-06-17 13:16:54 +00:00
- name: upload_build_pr
image: plugins/s3
settings:
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
2022-05-10 14:38:16 +00:00
source: dist/**/*
2020-06-17 13:16:54 +00:00
target: /pr-${DRONE_PULL_REQUEST}/
2022-05-10 14:38:16 +00:00
strip_prefix: dist/
2020-06-17 13:16:54 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- pull_request
depends_on:
2022-05-10 14:38:16 +00:00
- build
2020-06-17 13:16:54 +00:00
2020-06-19 18:43:58 +00:00
- name: upload_build_branch
2020-06-17 13:16:54 +00:00
image: plugins/s3
settings:
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
2022-05-10 14:38:16 +00:00
source: dist/**/*
2020-06-19 18:43:58 +00:00
target: /${DRONE_COMMIT_BRANCH/\//_}/
2022-05-10 14:38:16 +00:00
strip_prefix: dist/
2020-06-17 13:16:54 +00:00
path_style: true
endpoint: https://artifacts.fromouter.space
when:
event:
- push
depends_on:
2022-05-10 14:38:16 +00:00
- build
2020-06-17 13:16:54 +00:00
- 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
2022-05-10 10:41:36 +00:00
trigger:
event:
- push
- pull_request
2020-06-17 13:48:05 +00:00
---
kind: signature
2022-05-10 14:36:47 +00:00
hmac: 80f0ae9213a4857606e7a6f2e64b9f1f47f1b80186f9ecd5b7aada7481a75db4