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. java 获取今天,昨天,上个月的日期

    获取今天,昨天,上个月的日期 的方法: Calendar cal = Calendar.getInstance(); //获取今天的日期 cal.setTime(new Date()); int ye ...

  2. React 16.3.0 发布,构建用户界面的 JavaScript 库

    React 16.3.0 已发布,React 是 Facebook 推出的一个为数据提供渲染为 HTML 视图,用来构建用户界面的开源 JavaScript 库. React 视图通常采用包含以自定义 ...

  3. PIL中文文档

    (0)http://hereson.iteye.com/blog/2224334 (1)http://blog.csdn.net/yjwx0018/article/details/52852067 ( ...

  4. CentOS 7.2下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1

    一.安装前的准备工作 1.yum update    #更新系统 2.yum install gcc gcc-c++ autoconf automake cmake bison m4 libxml2  ...

  5. Kafka、RabbitMQ、RocketMQ、ActiveMQ 17 个方面综合对比

    本文将从,Kafka.RabbitMQ.ZeroMQ.RocketMQ.ActiveMQ 17 个方面综合对比作为消息队列使用时的差异.(欢迎加入Java程序员群:630441304,一起学习交流会) ...

  6. Java SHA256/Base64转.NET(C#)实现---(华为云云市场.NET版本加密方式)

    前言: 工作需要,对接华为云应用市场的 API 接口,由于维护团队都是 .NET 所以用 .NET 来开发. 简单了解一下 SHA256 加密算法,本质就是一个 Hash,与 MD5 相比就是计算量大 ...

  7. 时间处理模块time

    一.时间概念 1.1 时间戳 时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总 秒数.通俗的讲, 时间戳是一份能够表示一份 ...

  8. python 重新修炼之路

    第一篇 基础篇 1.1  打造万能的开发环境-conda  1.2   python的代码规范与vscode配置   1.3 变量 与 关键字   1.4 数据类型     1.4.1 数字      ...

  9. linux FTP 操作

    1.登陆: ftp 172.xxx.xxx.xxx 按提示输入用户名和密码 2.上传: 单个文件:put /路径/文件名 批量: 输入 prom 此命令是关闭交互(否则总是询问你是否要上传) 输入下载 ...

  10. hdu 6097 Mindis(数学几何,圆心的反演点)

    Mindis Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Subm ...