Drone自托管的Drone服务器之间的管道路由

时间:2019-04-02 13:08:18

标签: drone drone.io

我有开发和生产的kubernetes集群,每个集群中都有无人机服务器。两台服务器都在观看相同的github回购集。

我想做类似的事情:

---
kind: pipeline
name: artifacts
drone_instance: dev   # <--- magic routing

steps:
  - ...
trigger:
  event: tag
  ref: refs/tags/dev-*

---
kind: pipeline
name: deploy_dev
drone_instance: dev  # <--- magic routing

steps:
  - ...
trigger:
  event: tag
  ref: refs/tags/dev-*

---
kind: pipeline
name: deploy_prod
drone_instance: prod  # <--- magic routing

steps:
  - ...
trigger:
  event: tag
  ref: refs/tags/prod-*

例如在不同的无人机实例上运行不同的管道。我正在查看platform过滤器,但它在Kubernetes模式下似乎不可用。有人砍过类似的东西吗?

注意:相应的gh线程https://github.com/drone/drone-runtime/issues/63

1 个答案:

答案 0 :(得分:0)

Gitter的drone.io团队提供了答案:

  

我建议将.drone.yml用于产品,然后创建一个   .drone.dev.yml for dev。在您的dev Drone实例中,在存储库中   设置,将Drone指向.drone.dev.yml