This commit is contained in:
parent
75c3c867b4
commit
a3cff17506
1 changed files with 3 additions and 80 deletions
|
@ -1,87 +1,10 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
dependencies:
|
|
||||||
image: node
|
|
||||||
commands:
|
|
||||||
- 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
|
|
||||||
group: build
|
|
||||||
|
|
||||||
diocane:
|
diocane:
|
||||||
image: node
|
image: node
|
||||||
secrets: [minio_access]
|
secrets: [minio_access]
|
||||||
commands:
|
commands:
|
||||||
- echo $minio_access
|
- echo $minio_access
|
||||||
|
- echo $${minio_access}
|
||||||
|
- echo $MINIO_ACCESS
|
||||||
|
- echo $${MINIO_ACCESS}
|
||||||
group: build
|
group: build
|
||||||
|
|
||||||
upload_build_versioned:
|
|
||||||
image: woodpeckerci/plugin-s3
|
|
||||||
bucket: tghandbook
|
|
||||||
secrets: [minio_access, minio_secret]
|
|
||||||
access_key: $minio_access
|
|
||||||
secret_key: $minio_secret
|
|
||||||
source: dist/**/*
|
|
||||||
target: /${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}/
|
|
||||||
strip_prefix: dist/
|
|
||||||
path_style: true
|
|
||||||
endpoint: https://artifacts.fromouter.space
|
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
group: upload
|
|
||||||
|
|
||||||
upload_build_pr:
|
|
||||||
image: woodpeckerci/plugin-s3
|
|
||||||
bucket: tghandbook
|
|
||||||
secrets: [minio_access, minio_secret]
|
|
||||||
access_key: $minio_access
|
|
||||||
secret_key: $minio_secret
|
|
||||||
source: dist-pr/**/*
|
|
||||||
target: /pr-${DRONE_PULL_REQUEST}/
|
|
||||||
strip_prefix: dist-pr/
|
|
||||||
path_style: true
|
|
||||||
endpoint: https://artifacts.fromouter.space
|
|
||||||
when:
|
|
||||||
event: pull_request
|
|
||||||
group: upload
|
|
||||||
|
|
||||||
upload_build_branch:
|
|
||||||
image: woodpeckerci/plugin-s3
|
|
||||||
bucket: tghandbook
|
|
||||||
secrets: [minio_access, minio_secret]
|
|
||||||
access_key: $minio_access
|
|
||||||
secret_key: $minio_secret
|
|
||||||
source: dist-branch/**/*
|
|
||||||
target: /${DRONE_COMMIT_BRANCH/\//_}/
|
|
||||||
strip_prefix: dist-branch/
|
|
||||||
path_style: true
|
|
||||||
endpoint: https://artifacts.fromouter.space
|
|
||||||
group: upload
|
|
||||||
|
|
Reference in a new issue