0
votes

We have two branches for our solution, a dev and a main branch. We use the built in NuGet feed in TeamCity which is consumed by Octopus Deploy. The problem we have is we have one feed but two build tasks, one that builds the dev branch and publishes the artifacts and one that builds the main branch to publish the artifacts. We need a way to distinguish these packages, we are using the OctoPack plugin to build the packages.

What we would like is to end up with an artifact named: package-dev.1.0.0.0.nupkg

Is there a way using TeamCity to rename an artifact in this sense to append -dev before the version? Happy to append to the front, as long as Octopus Deploy picks up the latest version.

1

1 Answers

0
votes

The way I tackled this issue is by using unique version numbers across multiple builds with Auto Incrementer as a team city plugin.

This will ensure that each build that uses the autoincrementer has its own unique build number but this is where you just have to ensure your team is communicating well about which version is in which environment.

So if the autoinc is at 50 it should be something like :

-> Dev branch build outputs package.1.0.0.50 , then -> Main Branch outputs package 1.0.0.51

In octopus it's the same project or entirely different project!