https://github.com/rongfengliang/drone-appdemo
pipeline:
backend:
image: golang
commands:
- go build
- go test
- ls .
frontend:
image: node:6
commands:
- npm install
- npm test
docker:
group: deploy
image: plugins/docker
registry: youprivatedockerregistry # i use harbor
repo: youprivatedockerregistry/droneci/drone-demoapp
dockerfile: Dockerfile
username: dockerpush # harbor username
password: Dockerpushpassword # harbor userpassword
s3push:
group: deploy
image: plugins/s3
bucket: droneproject
source: ./**
access_key: access_key
secret_key: secret_key
target: /drone-appdemo
region: us-west-1
path_style: true
endpoint: you minio address # my minio address
说明:
比较简单,主要是私有harbor 以及minio 的配置
minio 的搭建可以参考:
https://github.com/rongfengliang/mino-thumbor-openresty
项目尽管有点负复杂,但是使用docker-compose 直接就可以起来,比较简单,实际上项目可能需要类似的方案
比如进行发布直接使用minio会是一个比较好的方案,项目中已经集成了这个功能了。
参考例子比较简单,实际上大家可以基于这个进行扩展,实现比较强大的功能(缩略图,h2 加速),租户分离。。。。。
https://github.com/rongfengliang/drone-appdemo
https://github.com/rongfengliang/mino-thumbor-openresty
http://plugins.drone.io/drone-plugins/drone-docker/
http://plugins.drone.io/drone-plugins/drone-s3/
drone 发布部署&&集成私有容器仓库&&构建代码s3 保存
原文:https://www.cnblogs.com/rongfengliang/p/8984855.html