test drone

master
cxz66666 2020-08-09 14:41:34 +08:00
parent 0ed1b5f1ef
commit 1456132db9
2 changed files with 50 additions and 1 deletions

49
.drone.yml 100644
View File

@ -0,0 +1,49 @@
kind: pipeline
name: default
steps:
- name: restore
image: drillster/drone-volume-cache
restore: true
mount:
- ./node_modules
volume:
- /tmp/cache:/cache
- name: install
image: node:12.11.1
commands:
- npm install
- name: rebuild-cache
image: drillster/drone-volume-cache
rebuild: true
mount:
- ./node_modules
volumes:
- /tmp/cache:/cache
- name: build
image: node:12.11.1
commands:
- npm run build
- mv build main
- name: deploy
image: appleboy/drone-scp
settings:
host: zjueva.net
username: cibot
port: 22
key:
from_secret: cibot_front_secret
target: /srv/
source: main
trigger:
branch:
- master
event:
- push
- pull_request
- rollback

View File

@ -72,7 +72,7 @@ class UploadToOSS extends React.Component {
} }
console.log(this.state.headers); console.log(this.state.headers);
let result = await axios( let result = await axios(
"https://1767171970454994.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/nx/nx-test/", "https://1299271970796699.cn-hangzhou.fc.aliyuncs.com/2016-08-15/proxy/oss_upload/upload/",
{ {
headers: this.state.headers, headers: this.state.headers,
method: "POST", method: "POST",