1. clone

这个是内置的,实际上就行进行代码clone的

参考配置,同时我们可以使用自定义的插件

clone:
+ git:
+ image: plugins/git pipeline:
build:
image: golang
commands:
- go build
- go test
2. workspace
字面意思是工作空间,drone 的pipeline 过程中是共享的

参考配置 ,实际上就是指定我们项目代码的位置,以及目录结构

+workspace:
+ base: /go
+ path: src/github.com/octocat/hello-world pipeline:
build:
image: golang:latest
commands:
- go get
- go test
3. pipelins
构建的任务

参考配置

pipeline:
backend:
image: golang
commands:
- go build
- go test
frontend:
image: node
commands:
- npm install
- npm run test
- npm run build
4. webhook
实际上就是我们的项目构建出发的条件

实际的一些条件参考
http://docs.drone.io/pipeline-conditions/
5. service 
我们项目运行依赖的一些服务(redis, 数据库 。。。)

参考配置, 访问方式类似docker-compose 

pipeline:
build:
image: golang
commands:
- go build
- go test services:
database:
image: mysql cache:
image: redis
6. plugins
实际上drone 的每个任务都是使用容器插件构建的

参考

pipeline:
build:
image: golang
commands:
- go build
- go test publish:
image: plugins/docker
repo: foo/bar
tags: latest notify:
image: plugins/slack
channel: dev
7. promoting(提升,实际上就是开发中环境的转变)
参考

pipeline:
build:
image: golang
commands:
- go build
- go test publish:
image: plugins/docker
registry: registry.heroku.com
repo: registry.heroku.com/my-staging-app/web
when:
+ event: deployment
+ environment: staging publish_to_prod:
image: plugins/docker
registry: registry.heroku.com
repo: registry.heroku.com/my-production-app/web
when:
+ event: deployment
+ environment: production
8. Matrix Builds
实际上就是我们的一些构建环境参数 比如 golang 的不同运行时环境

参考配置

pipeline:
build:
image: golang:${GO_VERSION}
commands:
- go get
- go build
- go test services:
database:
image: ${DATABASE} matrix:
GO_VERSION:
- 1.4
- 1.3
DATABASE:
- mysql:5.5
- mysql:6.5
- mariadb:10.1
9. 参考资料
http://docs.drone.io/hooks/
http://docs.drone.io/workspace/
http://docs.drone.io/cloning/
http://docs.drone.io/pipelines/
http://docs.drone.io/services/
http://docs.drone.io/using-plugins/
http://docs.drone.io/promoting-builds/
http://docs.drone.io/matrix-builds/
 
 
 
 

drone 学习一 几个核心组件的更多相关文章

  1. 【Cloud Foundry】Could Foundry学习(二)——核心组件分析

    在阅读的过程中有不论什么问题,欢迎一起交流 邮箱:1494713801@qq.com    QQ:1494713801 Cloud Foundry核心组件架构图例如以下: 主要组件:     Clou ...

  2. drone 学习六 发布部署&&集成私有容器仓库&&构建代码s3 保存

    备注:      需要进行drone 以及gitlab 环境的配置,可以参考相关资料   1. 参考项目 https://github.com/rongfengliang/drone-appdemo ...

  3. drone 学习三 条件步骤

    1. 基本格式 pipeline: slack: image: plugins/slack channel: dev + when: + branch: master 2. 几种条件类型 a. bra ...

  4. drone 学习二 pipeline 说明

    1. 基本语法 pipeline: backend: image: golang commands: - go build - go test frontend: image: node comman ...

  5. drone 学习四 几个有用的命令

    1. 安装cli 工具 linux curl -L https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_am ...

  6. drone 学习五 集成gitlab 配置以及简单测试

    备注: 使用docker-compose  进行安装 同时集成gitlab,预备环境 docker  docker-compose  gitlab 1. docker-compose version: ...

  7. Spring学习10-SpringMVC原理及核心组件1

    一.SpringMVC原理     请求到来时,第一个接受这个请求的前端控制器叫DispatcherServlet(这个需要在web.xml中配置), 后端控制器叫Controller.负责处理请求U ...

  8. Kubernetes 学习(九)Kubernetes 源码阅读之正式篇------核心组件之 Scheduler

    0. 前言 继续上一篇博客阅读 Kubernetes 源码,参照<k8s 源码阅读>首先学习 Kubernetes 的一些核心组件,首先是 kube-scheduler 本文严重参考原文: ...

  9. .NET Core on K8S学习实践系列文章索引(Draft版)

    一.关于这个系列 自从去年(2018年)底离开工作了3年的M公司加入X公司之后,开始了ASP.NET Core的实践,包括微服务架构与容器化等等.我们的实践是渐进的,当我们的微服务数量到了一定值时,发 ...

随机推荐

  1. 高性能Go并发

    1.管道chan吞吐极限10,000,000,单次Put,Get耗时大约100ns/op,无论是采用单Go程,还是多Go程并发(并发数:100, 10000, 100000),耗时均没有变化,Go内核 ...

  2. [洛谷U62364]三次函数极值

    U62364 三次函数极值 题面 给定一个三次函数\(f(x)=a_3x^3+a_2x^2+a_1x+a_0\) 求其极值. 格式 输入包括一行四个整数\(a_3,a_2,a_1,a_0\) 输出包括 ...

  3. spoj-ASSIGN-bitDP

    ASSIGN - Assignments #dynamic-programming Problem Your task will be to calculate number of different ...

  4. HDU 5699 二分+线性约束

    http://acm.hdu.edu.cn/showproblem.php?pid=5699 此题满足二分性质,关键在于如何判断当前的时间值可以满足所有的运送方案中的最长的时间. 对于每一次枚举出的k ...

  5. confluence+Mysql5.7 版本安装破解

    此篇稍微过下msyql 的处理方案:其他详细请参照上一篇文章地址:https://www.cnblogs.com/flyrock/p/9693327.html mysql 最新版本8.0 有点坑,co ...

  6. MongoHelper.cs

    using System; using MongoDB.Bson; using MongoDB; using System.Web; using MongoDB.Driver; namespace Y ...

  7. 【后台测试】postman简介

    ◆版权声明:本文出自胖喵~的博客,转载必须注明出处. 转载请注明出处:http://www.cnblogs.com/by-dream/p/6266047.html 在接口测试的过程中,经常拿到一个接口 ...

  8. CMDB配置资源管理数据库(理解)

    CMDB是运维自动化的基础,它为日志系统,发布系统,监控系统等运维系统(ELK,zabbix,open-falcon)提供接口函数, 第一种方式:Agent方法实现,agent不能直接访问数据库,因为 ...

  9. python中“生成器”、“迭代器”、“闭包”、“装饰器”的深入理解

    一.生成器 1.什么是生成器? 在python中,一边循环一边计算的机制,称为生成器:generator. 2.生成器有什么优点? 1.节约内存.python在使用生成器时对延迟操作提供了支持.所谓延 ...

  10. python3与python2中的string.join()函数

    在python2中,string 模块中有一个join()函数,用于以特定的分隔符分隔源变量中的字符串,将其作为新的元素加入到一个列表中,例如: body=string.join(( "Fr ...