This repository has been archived on 2022-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
tghandbook/.woodpecker/build.yml

87 lines
2.1 KiB
YAML
Raw Normal View History

2021-11-06 00:18:53 +00:00
pipeline:
2021-11-17 15:44:59 +00:00
dependencies:
2021-11-17 15:42:28 +00:00
image: node
commands:
2021-11-17 15:44:59 +00:00
- yarn
build_versioned:
image: node
commands:
- export SUBPATH=/tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}
- export REVISION=${DRONE_COMMIT_SHA}
- yarn build
group: build
build_pr:
image: node
commands:
- export SUBPATH=/tghandbook/pr-$${DRONE_PULL_REQUEST}
- export REVISION=${DRONE_COMMIT_SHA}
- yarn build
environment:
- OUTDIR=./dist-pr
when:
event: pull_request
group: build
build_branch:
image: node
commands:
- export SUBPATH=/tghandbook/${DRONE_COMMIT_BRANCH/\//_}
- export REVISION=${DRONE_COMMIT_SHA}
- yarn build
environment:
- OUTDIR=./dist-branch
when:
event: push
2021-11-17 15:42:28 +00:00
group: build
2021-11-17 15:44:59 +00:00
upload_build_versioned:
image: woodpeckerci/plugin-s3
2021-11-17 15:50:58 +00:00
secrets: [minio_access, minio_secret]
2021-11-17 15:47:39 +00:00
settings:
bucket: tghandbook
2021-11-17 15:53:54 +00:00
source: ./dist/**/*
2021-11-17 15:47:39 +00:00
target: /${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}/
strip_prefix: dist/
path_style: true
endpoint: https://artifacts.fromouter.space
2021-11-17 15:49:36 +00:00
environment:
2021-11-17 15:50:58 +00:00
AWS_ACCESS_KEY_ID: $MINIO_ACCESS
AWS_SECRET_ACCESS_KEY: $MINIO_SECRET
2021-11-17 15:44:59 +00:00
when:
event: push
group: upload
upload_build_pr:
image: woodpeckerci/plugin-s3
secrets: [minio_access, minio_secret]
2021-11-17 15:47:39 +00:00
settings:
bucket: tghandbook
2021-11-17 15:53:54 +00:00
source: ./dist-pr/**/*
2021-11-17 15:47:39 +00:00
target: /pr-${DRONE_PULL_REQUEST}/
strip_prefix: dist-pr/
path_style: true
endpoint: https://artifacts.fromouter.space
2021-11-17 15:49:36 +00:00
environment:
2021-11-17 15:50:58 +00:00
AWS_ACCESS_KEY_ID: $MINIO_ACCESS
AWS_SECRET_ACCESS_KEY: $MINIO_SECRET
2021-11-17 15:44:59 +00:00
when:
event: pull_request
group: upload
upload_build_branch:
image: woodpeckerci/plugin-s3
secrets: [minio_access, minio_secret]
2021-11-17 15:47:39 +00:00
settings:
bucket: tghandbook
2021-11-17 15:53:54 +00:00
source: ./dist-branch/**/*
2021-11-17 15:47:39 +00:00
target: /${DRONE_COMMIT_BRANCH/\//_}/
strip_prefix: dist-branch/
path_style: true
endpoint: https://artifacts.fromouter.space
2021-11-17 15:49:36 +00:00
environment:
2021-11-17 15:50:58 +00:00
AWS_ACCESS_KEY_ID: $MINIO_ACCESS
AWS_SECRET_ACCESS_KEY: $MINIO_SECRET
2021-11-17 15:44:59 +00:00
group: upload