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. PHP libevent函数基本介绍

    3.2   主要函数介绍 按照使用libevnet库顺序,看一下相关函数做什么操作. 3.2.1  event_init 调用event_base_new,初始化struct event_base对象 ...

  2. spring mvc: json练习

    spring mvc: json练习 本例需要用到的json包: 如下: jackson-databind jackson-core jackson-annotations <!-- https ...

  3. PHP XML Parser 函数

    PHP XML Parser 简介 XML 函数允许您解析 XML 文档,但无法对其进行验证. XML 是一种用于标准结构化文档交换的数据格式.您可以在我们的 XML 教程 中找到更多有关 XML 的 ...

  4. JS判断键盘上的上下左右键

    document.onkeydown=function(event){ var e = event || window.event || arguments.callee.caller.argumen ...

  5. HDU 4274 Spy's Work (树形DP)

    题意 给定一棵树,给出一些子树的权值关系,问是否矛盾(初始所有结点的下限为1) 思路 设lmin和lmax表示题目给定的限制范围,默认为[1..oo]:amin和amax表示实际符合要求的范围.从根节 ...

  6. GPON介绍及华为OLT网关注册配置流程(转)

    原文地址:https://blog.csdn.net/zhouzxi/article/details/79244862 一.GPON介绍 1.GPON简介 随着技术的发展,光纤变得“便宜又好用”,因此 ...

  7. ZOJ 3521 Fairy Wars oj错误题目,计算几何,尺取法,排序二叉树,并查集 难度:2

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3521 ATTENTION:如果用long long 减小误差,这道题只能用 ...

  8. SQL语句往Oracle数据库中插入日期型数据(to_date的用法)

    Oracle 在操作数据库上相比于其他的 T-sql 有微小的差别,但是在插入时间类型的数据是必须要注意他的 to_date 方法,具体的情况如下: --SQL语句往Oracle数据库中插入日期型数据 ...

  9. 【LeetCode 228_数组】Summary Ranges

    vector<string> summaryRanges(vector<int>& nums) { int nums_len = nums.size(); vector ...

  10. L158

    It started out modestly enough: David Hertz, having learned that under the right conditions you real ...