From 5199f8091474b1ad2a807be863110ffe2e6d7c33 Mon Sep 17 00:00:00 2001 From: Jason-ZW Date: Thu, 2 Jun 2022 16:40:38 +0800 Subject: [PATCH] Fix Drone CI Signed-off-by: Jason-ZW --- .drone.yml | 110 +++++++++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9a4cbed..fd1f4cd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,58 +8,70 @@ platform: arch: amd64 steps: -- name: build - image: node - commands: - - npm install - - npm run build - when: - event: - - push - - tag + - name: build + image: node + commands: + - npm install + - npm run build + when: + event: + - push + - tag -- name: upload-test-to-oss - image: wangsiye/aliyun-ossutil:latest - environment: - OSS_KEY_ID: - from_secret: OSS_KEY_ID - OSS_KEY_SECRET: - from_secret: OSS_KEY_SECRET - commands: - - ossutil config -L CH -e "oss-cn-shenzhen.aliyuncs.com" -i $OSS_KEY_ID -k $OSS_KEY_SECRET - - ossutil cp -rf ./dist oss://dev-tool/aliyun-ecs - when: - event: - - push + - name: upload-test-to-oss + image: jacie/drone-aliyun-oss + pull: always + environment: + ALIYUN_ACCESS_KEY_ID: + from_secret: aliyun_access_id + ALIYUN_SECRET_ACCESS_KEY: + from_secret: aliyun_access_secret + PLUGIN_SOURCE: ./dist + ALIYUN_BUCKET: oss://dev-tool + ALIYUN_ENDPOINT: http://oss-cn-shenzhen.aliyuncs.com + PLUGIN_TARGET: aliyun-ecs + PLUGIN_RECURSIVE: -r + PLUGIN_ACCESS: public-read + commands: + - "aliyun-oss" + when: + event: + - push -- name: deployment-to-oss - image: wangsiye/aliyun-ossutil:latest - environment: - ALIYUN_ACCESS_KEY_ID: - from_secret: aliyun_access_id - ALIYUN_SECRET_ACCESS_KEY: - from_secret: aliyun_access_secret - commands: - - ossutil config -L CH -e "oss-cn-beijing.aliyuncs.com" -i $ALIYUN_ACCESS_KEY_ID -k $ALIYUN_SECRET_ACCESS_KEY - - ossutil cp -rf ./dist oss://rancher2-drivers/pandaria/ui/node-driver-aliyun/${DRONE_TAG} - when: - event: - - tag + - name: deployment-to-oss + image: jacie/drone-aliyun-oss + pull: always + environment: + ALIYUN_ACCESS_KEY_ID: + from_secret: aliyun_access_id + ALIYUN_SECRET_ACCESS_KEY: + from_secret: aliyun_access_secret + PLUGIN_SOURCE: ./dist + ALIYUN_BUCKET: oss://rancher2-drivers + ALIYUN_ENDPOINT: http://oss-cn-beijing.aliyuncs.com + PLUGIN_TARGET: pandaria/ui/node-driver-aliyun/${DRONE_TAG} + PLUGIN_RECURSIVE: -r + PLUGIN_ACCESS: public-read + commands: + - "aliyun-oss" + when: + event: + - tag -- name: github_binary_prerelease - image: plugins/github-release - settings: - api_key: - from_secret: github_token - checksum: - - sha256 - files: - - dist/* - prerelease: true - title: "Pre-release ${DRONE_TAG}" - when: - event: - - tag + - name: github_binary_prerelease + image: plugins/github-release + settings: + api_key: + from_secret: github_token + checksum: + - sha256 + files: + - dist/* + prerelease: true + title: "Pre-release ${DRONE_TAG}" + when: + event: + - tag node: instance: agent-amd64