drone 学习二 pipeline 说明
2024-08-25 12:03:50
1. 基本语法
pipeline:
backend:
image: golang
commands:
- go build
- go test
frontend:
image: node
commands:
- npm install
- npm run test
- npm run build
2. 构建步骤
pipeline:
backend:
image: golang
commands:
+ - go build # 构建步骤
+ - go test # 构建步骤
3. 并行执行(使用group 属性)
pipeline:
backend:
+ group: build
image: golang
commands:
- go build
- go test
frontend:
+ group: build
image: node
commands:
- npm install
- npm run test
- npm run build
publish:
image: plugins/docker
repo: octocat/hello-world
4. 条件执行
pipeline:
slack:
image: plugins/slack
channel: dev
+ when:
+ branch: master
备注: 详细使用可以参考
http://docs.drone.io/step-conditions/
5. 构建失败操作(比如使用slack 进行通知)
pipeline:
slack:
image: plugins/slack
channel: dev
+ when:
+ status: [ success, failure ]
备注: 详细使用可以参考
http://docs.drone.io/step-conditions/
6. 参考资料
http://docs.drone.io/pipelines/
最新文章
- SPI协议及IO模拟
- 在Thinkphp3.2.3框架下实现自动获取客户端IP地址的get_client_ip()函数
- Webstorm常用的快捷键
- [偏微分方程教程习题参考解答]4.1Duhamel 原理
- nand flash相关
- VC++2010添加菜单
- xv6中存储cpu和进程信息的技巧
- C#DataTable DataSet DataRow区别详解
- 从头开始学JavaScript (九)——执行环境和作用域
- oracle查询第一篇
- Java小知识点总结
- SQL中内连接和外连接的区别
- (转)通过maven,给没有pom文件的jar包生成pom文件,maven项目引入本地jar包
- docker的网络访问
- Linux核心命令
- composer更改源为国际
- JS的初步了解
- [DUBBO] Unexpected error occur at send statistic, cause: Forbid consumer 192.168.3.151 access servic
- flask 在视图函数里操作数据库
- MySQL中死锁(转)