Skip to content

Commit

Permalink
Fix Drone CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jason-ZW <[email protected]>
  • Loading branch information
rancher-sy-bot committed Jun 2, 2022
1 parent 329dbff commit 5199f80
Showing 1 changed file with 61 additions and 49 deletions.
110 changes: 61 additions & 49 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5199f80

Please sign in to comment.