From 72e86f13ed14feeca929cedcbce16f16ca24a89c Mon Sep 17 00:00:00 2001 From: Hamcha Date: Sat, 6 Nov 2021 02:19:44 +0100 Subject: [PATCH] Re-add upload step --- .woodpecker/build.yml | 89 ++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 9d933b3..04b3317 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -8,7 +8,7 @@ pipeline: image: node commands: - export SUBPATH=/tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8} - - export REVISION=$DRONE_COMMIT_SHA + - export REVISION=${DRONE_COMMIT_SHA} - yarn build group: build @@ -16,7 +16,7 @@ pipeline: image: node commands: - export SUBPATH=/tghandbook/pr-$${DRONE_PULL_REQUEST} - - export REVISION=$DRONE_COMMIT_SHA + - export REVISION=${DRONE_COMMIT_SHA} - yarn build environment: - OUTDIR=./dist-pr @@ -35,45 +35,46 @@ pipeline: when: event: push 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 + + 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