跳至正文
Wener Notes

Drone Pipeline

约 1 分钟阅读
yaml
kind: pipeline
type: docker
name: default

clone:
  retries: 3

trigger:
  branch: # include: [], exclude: []
    - master
  event:
    - push
  ref:
    - refs/heads/master
    - refs/heads/**
    - refs/pull/*/head
  repo:
  status:
  target:
  cron:
  action:

platform:
  os: linux
  arch: amd64
  version:
workspace:
  path: /src

# label
node: {}

steps:
  - name: build
    image: golang
    environment:
      GOOS: linux
      GOARCH: amd64
    # http://plugins.drone.io/
    settings: {}
    commands:
      - go build
      - go test
    # fail, fail-fast, fast, always, ignore
    failure: ignore
    # 可以后台执行 - 忽略结果
    detach: false
    privileged: false
    when:
      branch:
        - master

  - name: notify
    image: plugins/slack
    settings:
      webhook: https://hooks.slack.com/services
    when:
      status:
        - failure
        - success

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

其他外链1 条
最近更新commit c88d325编辑