I found an issue with output variable scoping using Cloud Regions.
Steps to reproduce:
- Create two cloud regions (eg: northeurope / westeurope) and apply the same role to them (eg Web)
- Create a new project
- Add a step to the process to execute a powershell script on the previously defined role (Web) and name “Write var” with the following code:
Write-Host "Setting MachineNameTest : $($OctopusParameters['Octopus.Machine.Name'])" Set-OctopusVariable -name "MachineNameTest" -value $OctopusParameters["Octopus.Machine.Name"]
- Add another step to the process to execute a powershell script on the previously defined role (Web) and name “Read var” with the following code:
Write-Host "Getting MachineNameTest : $($OctopusParameters['Octopus.Action[Write var].Output.MachineNameTest'])"
The output variables should be scoped to the cloud region. In step 2, I expect northeurope when deploying to the northeurope cloud region and westeurope when deploying to the westeurope cloud region
Actual result (see screenshot):
In step 2, both deployments receive the value “northeurope”, the output variable is not correctly scoped to the cloud region