Always using the latest version on deploy

I have TeamCity with 1 project but with 2 build conigurations:

  • Development branch (build numbering 2.0.0.X)
  • Release branch (build numbering 2.0.1.X)

Octopus deploy has 1 project with Test and Live environment.

Dev branch is setup to automatically deploy to Octopus deploy, it is set to deploy to “Test” (in TeamCity).

But the Release branch also does releases, at the same time as Development.

Today I did a pushed a package / build 2.0.1.3 to the Live environment by hand. Later I ran the Test build, which is labelled as 2.0.0.233. Problem is that Octo doesn’t care about the build number, it will always take the latest package it finds from the TeamCity nuget feed.

How do I configure Octo that it takes the package I am actually pushing from TeamCity instead of just ignoring the build numbers?

Hi,

Thanks for your post!

To tell Octopus which package you want it to pick up you need to add a variable to the TeamCity plugin extra arguments field:
Under Advanced -> Additional Command line arguments add:
–packageversion=%build.number%

The documentation can be found at the following:

Hope that helps!

Vanessa