Package name build from Variables NOT using snapshot variables for release

Hi,

Octopus version 2.5, we have multi-tenant environments that deploy different branches of our software into the same environment, e.g we have Releases that look like this #{Version}-#{Branch}, e.g

1.3-Branch2
1.2-Branch1
1.1-Branch2
1.0-Branch1

And we have NUGET packages for each release, e.g PackageName-#{Branch}.version

PackageName-Branch1.1.0
PackageName-Branch2.1.1

The problem is when going to promote an older version, the value for #{Branch} is being taken from the latest version when attempting to resolve the package, rather than the value in the snapshot, so.

When we try and promote 1.0 after we have created release 1.3, we get the error on the deploy screen:

The resource ‘PackageName-Branch2 version 1.0’ was not found.

The work around for this is to not put the branch name in the package name and rely on the version, but this feels like an issue to me as its not respecting the snapshot in this case.

Thanks,
James

Hi James,

Thanks for getting in touch! This is an interesting scenario. I am of the opinion that it should use the package from the release as defined, and should not reevaluate the variable, so I have created an issue in GitHub to discuss the original design. https://github.com/OctopusDeploy/Issues/issues/1521 Feel free to track the issue.

Thanks for bringing this to our attention.
Vanessa