Drone CI 中文文档

Settings

Use the settings section to configure the Digital Ocean instance type. The runner creates the instance and executes pipeline commands on the instance using the ssh protocol.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
kind: pipeline
type: digitalocean
name: default

token:
  from_secret: token

server:
  image: docker-18-04
  size: s-1vcpu-1gb
  region: nyc1

steps:
- name: build
  commands:
  - go build
  - go test

Digital Ocean Token

In the above example we provide the digital ocean token, sourced from a secret. This token is require in order to authenticate with the Digital Ocean API and create the server instance.

 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
token:
  from_secret: token

server:
  image: docker-18-04
  size: s-1vcpu-1gb
  region: nyc1

steps:
- name: build
  commands:
  - go build
  - go test