Thanks in advance for the help
teamcity manages the version number, ex: 1.29.0.xxx
We create the packages using teamcity, and deploy them to the octopus nuget server
a build step then create the corresponding release.
for the latest version (dev branch on git), everything ok
the problem is that we have another branch in progress (RC) using a lower release number, eg: 1.28.0.xxxx
this is the QA branch, where some corrections are done before going to prod, while in the meantime the dev progresses on next version
so there is a dedicated build configuration in teamcity, that creates the packages (1.28.0.xxx) and the corresponding release in octopus
problem: the release 1.28.0.xxx takes the latest packages (1.29.0.xxx) instead of the packages of the same version number (just pushed by teamcity)
how can we deal with this ?
Thanks for reaching out. In its current version, Octopus treats the package from different branches but same ID as “the same packages”. So if you have MyPackage.2.0.0-Stage and MyPackage.1.0.0-Prod, Octopus will always take the first one as the latest.
This is a scenario that a lot of our users have ran into, and we definitely have plans to support it as explained on this blog post: http://octopusdeploy.com/blog/rfc-branching . We dont have a release date for this feature yet, but it’ll come in Octopus 3.2. In case you haven’t heard, we shipped a pre-release of 3.1 last night, meaning that 3.2 is not that far away.
In your case I’d recommend you to pass the exact package version as an argument when creating the release from TeamCity. You can do this by passing the
--packageversion argument to the Octo.exe call in the “Octopus Deploy: Create Release” step (See attached screenshot). You can use a TeamCity variable to set the value for that argument.
Hello Dalmiro, thank for your help.
Unfortunately, the Ocotpus project process has multiple steps, calling other nuget packages, and sending the argument from teamcity causes all packages to be requested on the version passed as argument… not working
CORRECTION, i spoke too fast, will try the argument package=StepName:Version
Else, i guess that i have to create another project to deal this for now (a “clone project” button would be usefull
i tried the argument, --package=StepName:Version
and it works
thanks again !!