Multiple Rancher environments with the same stack name, possibly containing different services but that is not necessary, results in drone-rancher selecting the first matching stack name, from any environment, to act upon. This can cause unexpected service upgrades or failures to find the service depending on what the upgrade targets.
Using the above snippet upgrading the service MyCoolStack/Service6 in the environment Cloud - Dev2 will fail with a service not found error because drone-rancher matched the first stack name MyCoolStack in the site Cloud - Dev1. As Service6 doesn't exist in this stack the upgrade fails.
Likewise attempting to upgrade the service MyCoolStack/Service1 in the environment Cloud - Prod2 will actually upgrade the service MyCoolStack/Service1 in the environment Cloud - Prod1 as there is no way to specify the target environment.
Multiple Rancher environments with the same stack name, possibly containing different services but that is not necessary, results in drone-rancher selecting the first matching stack name, from any environment, to act upon. This can cause unexpected service upgrades or failures to find the service depending on what the upgrade targets.
Example Rancher site layout:
Example drone.yml snippet:
Using the above snippet upgrading the service
MyCoolStack/Service6
in the environmentCloud - Dev2
will fail with a service not found error because drone-rancher matched the first stack nameMyCoolStack
in the siteCloud - Dev1
. AsService6
doesn't exist in this stack the upgrade fails.Likewise attempting to upgrade the service
MyCoolStack/Service1
in the environmentCloud - Prod2
will actually upgrade the serviceMyCoolStack/Service1
in the environmentCloud - Prod1
as there is no way to specify the target environment.Workarounds-