您的位置 首页 golang

一个基于 Docker 的持续集成平台,使用 Go 语言编写

drone

是一种基于 容器技术 的持续交付系统。Drone使用简单的 YAML 配置文件(docker-compose的超集)来定义和执行 Docker 容器中的Pipelines。

示例配置

pipeline:
 backend:
 image: golang
 commands:
 - go get
 - go build
 - go test
 frontend:
 image: node:6
 commands:
 - npm install
 - npm test
 publish:
 image: plugins/docker
 repo: octocat/hello-world
 tags: [ 1, 1.1, latest ]
  registry : index.docker.io
 notify:
 image: plugins/slack
 channel: developers
 username: drone
 

安装

在安装时有三种方式:

  1. 单机
  2. 集群
  3. Kubernetes

下面选择的是单机方式

Drone服务器作为轻量级Docker映像分发,没有任何外部依赖项。

docker pull drone/drone:1
 

启动服务器

docker run \
 --volume=/ var /run/docker.sock:/var/run/docker.sock \
 --volume=/var/lib/drone:/data \
 --env=DRONE_GITHUB_SERVER= \
 --env=DRONE_GITHUB_CLIENT_ID={% your-github-client-id %} \
 --env=DRONE_GITHUB_CLIENT_SECRET={% your-github-client-secret %} \
 --env=DRONE_RUNNER_CAPACITY=2 \
 --env=DRONE_SERVER_HOST={% your-drone-server-host %} \
 --env=DRONE_SERVER_PROTO={% your-drone-server-protocol %} \
 --env=DRONE_TLS_AUTOCERT=true \
 --publish=80:80 \
 --publish=443:443 \
 --restart=always \
 --detach=true \
 --name=drone \
 drone/drone:1
 

github地址

您知道哪些好用的DOCKER 集成工具,欢迎评论分享,共同探讨学习

如果觉得文章能够对您有所帮助,可以关注我,你的支持会鼓励我不断分享更多更好的优质文章。

文章来源:智云一二三科技

文章标题:一个基于 Docker 的持续集成平台,使用 Go 语言编写

文章地址:https://www.zhihuclub.com/100367.shtml

关于作者: 智云科技

热门文章

网站地图