diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 0fef85a..0000000 --- a/.drone.yml +++ /dev/null @@ -1,148 +0,0 @@ ---- -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 - environment: - SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8} - REVISION: ${DRONE_COMMIT_SHA} - when: - event: - - push - depends_on: - - dependencies - - - name: build_pr - image: node - commands: - - yarn build - environment: - SUBPATH: /tghandbook/pr-${DRONE_PULL_REQUEST} - OUTDIR: ./dist-pr - REVISION: ${DRONE_COMMIT_SHA} - when: - event: - - pull_request - depends_on: - - dependencies - - - name: build_branch - image: node - commands: - - yarn build - environment: - SUBPATH: /tghandbook/${DRONE_COMMIT_BRANCH/\//_} - OUTDIR: ./dist-branch - REVISION: ${DRONE_COMMIT_SHA} - when: - event: - - push - 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_BRANCH/\//_}-${DRONE_COMMIT_SHA:0:8}/ - strip_prefix: dist/ - path_style: true - endpoint: https://artifacts.fromouter.space - when: - event: - - push - 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-pr/**/* - target: /pr-${DRONE_PULL_REQUEST}/ - strip_prefix: dist-pr/ - path_style: true - endpoint: https://artifacts.fromouter.space - when: - event: - - pull_request - depends_on: - - build_pr - - - name: upload_build_branch - image: plugins/s3 - settings: - bucket: tghandbook - access_key: - from_secret: minio_access - secret_key: - from_secret: minio_secret - source: dist-branch/**/* - target: /${DRONE_COMMIT_BRANCH/\//_}/ - strip_prefix: dist-branch/ - path_style: true - endpoint: https://artifacts.fromouter.space - when: - event: - - push - depends_on: - - build_branch - - - 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 ---- -kind: signature -hmac: 55dfd5c47c79e51394c5cdfaa9b98a6f6acd84e751e92964c202ac19b46c0373 diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml new file mode 100644 index 0000000..5dc0a3a --- /dev/null +++ b/.woodpecker/build.yml @@ -0,0 +1,79 @@ +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 +# 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 diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..9e7f476 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,9 @@ +pipeline: + dependencies: + image: node + commands: + - yarn + lint: + image: node + commands: + - yarn lint