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/

猜你喜欢

转载自www.cnblogs.com/rongfengliang/p/8982078.html