Multi Cluster Pipeline

It would be nice if rancher pipeline could set kubernetes context based on branches, so you can switch cluster dependent on dev and production branches.

What you can do is create 2 different pipelines in 2 different clusters where both listen to the same git repository but different branches.

But then you have x amount of rancher-pipeline.yaml files, thats all unique for different branches? Then you need to ignore it for merges.

So my question with this is how to trigger the pipelines on only the one cluster.

I have my different pipeline files working between the branches. But if I do a push to dev, it triggers on both clusters (since the webhooks are there for both). But I want a push to dev to only run on the dev cluster and master to run only on the production cluster.

I’ve tried conditionals but because it can’t limit on the cluster only the branch they are always true.

Running rancher 2.4.8. Haven’t upgraded to 2.5 yet. Thats coming soon.