drone 学习三 条件步骤

1. 基本格式

pipeline:
  slack:
    image: plugins/slack
    channel: dev
+   when:
+     branch: master

2. 几种条件类型

a.  branch

when:
  branch: [master, develop]


b.  events

when:
  event: tag
  
  
c. status

when:
  status: changed
  
d. platform

when:
  platform:  [ linux/*, windows/amd64 ]
  
e. enviroment

when:
  environment: production
  event: deployment
  
f. matrix permutation (比如运行时环境,以来的服务)

when:
  matrix:
    GO_VERSION: 1.5
    REDIS_VERSION: 2.8
    
g. instance  (zrone 实例)

when:
  instance: stage.drone.company.com
  

3. 参考资料

http://docs.drone.io/step-conditions/

posted on 2018-05-02 19:39  荣锋亮  阅读(480)  评论(0编辑  收藏  举报

导航