We have an automated build on TFS that creates a release in Octopus, which is autonomously deployed to a test environment.
As part of this build we provide a --defaultpackageversion
value that lines up with our release roadmap, e.g. 4.1.1.1
- this version is assigned in the build template and all projects go into Octopus with that version correctly.
As part of this release though, there is one package that comes from our NuGet remote feed that doesn't reflect the release roadmap version, e.g. 1.1.0.0
.
So, for every package Octopus deploys 4.1.1.1
, but attempts to resolve 4.1.1.1
for this specific package, where only 1.1.0.0
exists.
There is an argument for octo.exe that allows us to provide a version for a given step, --package=StepName
.
To provide the version for this step name, I would need to:
- Get the NuGet package ID
- Use NuGet to get the latest version for this package
- Pipe this version with the step name into
octo.exe
This means having to specify (as part of the TFS build template) both the NuGet package ID and the Octopus Step that deploys said package. So if the step changed to deploy a different NuGet package, I'd have to reflect that change in each build template that provides this argument.
It seems to me, I should be able to:
- Tell Octopus to deploy a specific version of a NuGet package, without providing a particular step.
- Tell Octopus to automatically get the latest version of a NuGet package given a step name.
I can't see any arguments that would allow me to achieve either of the options above.
Does anyone know how to achieve either option above (or something similar)? Otherwise I will probably have to go down the route of specifying both step name and NuGet package ID in the build template (not ideal).