I am using TeamCity for continuous integration and Octopus Deploy for continuous deployment.
In TeamCity, I have a project which I build and then package using Octopus Deploy's OctoPack. There are currently three build configurations defined:
- Build, Test, Package
- Deploy to CI
- Deploy to QA
For the OctoPack configuration in the first configuration, the package version is generated via the build number:
OctoPack package version: 1.0.0.%build.number%
The deploy to CI then initiates an Octopus Deploy release if Build, Test, Package
successfully builds. Octopus Deploy uses the NuGet version number as the release version number when the release is created. So for build #400 I have a My.Project.1.0.0.400.nupkg
NuGet package, which is released as version 1.0.0.400
.
in the Deploy to QA
step, I need to be able to promote the release associated with a specific Deploy to CI
build from my CI
environment to my QA
environment.
In essence, I want to be able to have this kind of dependency tree:
Build, Test, Package
|-- #401 SUCCESS
|-- #400 FAILURE
|-- #399 FAILURE
|-- #398 SUCCESS
/ #391-397 FAILURE
|-- #390 SUCCESS
Deploy to CI
|-- #100 SUCCESS (Depends Build, Test, Package #401)
|-- #99 SUCCESS (Depends Build, Test, Package #398)
|-- #98 SUCCESS (Depends Build, Test, Package #390)
Deploy to QA
|-- #10 SUCCESS (Depends Deploy to CI #100)
|-- #9 SUCCESS (Depends Deploy to CI #98)
And in Octopus I would see the following:
Release
|-- 1.0.0.100 CI, QA
|-- 1.0.0.99 CI
|-- 1.0.0.98 CI, QA
How can I pass along a specific version number to promote to a given environment in TeamCity?