Teamcity octopus deploys branch processing of plural code branches (by default, and develops) with the same project name

So, at the moment, teamcity is reviewing and building the Mercurial development branch using the AssemblyInfoPatcher plugin, and Project.Web.sxxxnupkg appears in artifacts, and the octopus deploys this into an intermediate environment. amazing stuff.

Now I'm just trying to figure out how to configure octopus deployment to handle the default branch, which will also be deployed for production.

I installed teamcity to create Project.Website.1.xxxnupkg from the default branch, but as an octopus knows which package is an intermediate line from the development branch and which is the production from the default branch, seeing, besides the version, they have the same project name, as in Project.Website?

At the moment, I have an intermediate environment, roles and an intermediate project team. I just need to create a new group environment and roles for production, and if so, how does the octopus know how to make its own bit?

Both tools are amazing pieces of the kit, and I'm sure I'm pretty close right now. any help would be greatly appreciated.

+7
source share
1 answer

You will need to set up the environment for Production in Octopus Deploy.

Assumptions:

  • Your production environment at Octopus is called Production
  • You use octo.exe in the build command line step in TeamCity to create and deploy releases.

You can use the --deployto option for octo.exe to specify the environment for deploying your newly created version. Something like that:

octo create-release --server=http://your-octopus/api --project=Project.Website --version=%build.number% --packageVersion=%build.number% --deployto=Production

This command will:

  • Create a release using TeamCity build number as version
  • Use TeamCity build number as package version for all packages
  • Deploy Production

TIP. Sometimes TeamCity takes a few seconds to get NuGet artifacts in it. If your octo team tries to create a release using versions of a package that have not yet been published, the command (and build step) will fail. I create a 30 second "sleep" in my script before running the octo.exe command to make sure the build server has managed to publish the current version of the packages.

+3
source

All Articles