2020-12-24 11:09:31 +08:00
|
|
|
|
# GoCOS
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-25 11:41:25 +08:00
|
|
|
|
腾讯云对象存储(COS),Drone CI插件,[AWS S3](http://plugins.drone.io/drone-plugins/drone-s3/)的COS实现
|
2020-12-24 10:36:26 +08:00
|
|
|
|
|
|
|
|
|
# Drone CI配置例子
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 10:36:26 +08:00
|
|
|
|
```yml
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: default
|
|
|
|
|
|
|
|
|
|
steps:
|
2020-12-25 11:39:38 +08:00
|
|
|
|
- name: upload
|
|
|
|
|
image: xiaoqidun/gocos
|
|
|
|
|
settings:
|
|
|
|
|
secret_id:
|
|
|
|
|
from_secret: secret_id
|
|
|
|
|
secret_key:
|
|
|
|
|
from_secret: secret_key
|
|
|
|
|
bucket_url:
|
|
|
|
|
from_secret: bucket_url
|
|
|
|
|
source: build/release
|
|
|
|
|
target: build/release
|
|
|
|
|
strip_prefix: build/release
|
2020-12-24 10:36:26 +08:00
|
|
|
|
```
|
2020-12-24 11:05:03 +08:00
|
|
|
|
|
|
|
|
|
# Drone CI配置说明
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### secret_id
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:16:34 +08:00
|
|
|
|
API密钥管理获得的SecretId
|
2020-12-24 11:05:03 +08:00
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### secret_key
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:16:34 +08:00
|
|
|
|
API密钥管理获得的SecretKey
|
2020-12-24 11:05:03 +08:00
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### bucket_url
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:05:03 +08:00
|
|
|
|
存储桶概览中的访问域名
|
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### source
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:16:34 +08:00
|
|
|
|
DroneCI中文件的源位置
|
2020-12-24 11:05:03 +08:00
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### target
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:05:03 +08:00
|
|
|
|
存储桶中文件的目标位置
|
|
|
|
|
|
2020-12-24 11:08:32 +08:00
|
|
|
|
### strip_prefix
|
2020-12-25 11:39:38 +08:00
|
|
|
|
|
2020-12-24 11:05:03 +08:00
|
|
|
|
从文件的源位置剔除前缀
|