我有dev & prod 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 模式下不可用。有没有人破解类似的smth?
注意:对应的GH螺纹 https://github.com/drone/drone-runtime/issues/63
Gitter drone.io 团队那里得到了答案:
我建议使用 .drone.yml 进行生产,然后创建一个 .drone.dev.yml for dev.在开发无人机实例中,在存储库中 设置,将无人机指向 .drone.dev.yml