Use a different environment-based package in Octopus Deploy

I understand that there is currently a function request for something similar, but I hope there is some workaround using the current version (1.6)

We create a dev branch in TFS for our developers and test environments, and create a QA and Production environment for our environments from the release branch in TFS. Since they produce separate nuget packages, I cannot use the same package. The deployment package option does not seem to have an environment option. Is there another way to say, "Deploy package X version Y for Dev / Test and package A for version Q / Production?"

+6
source share
1 answer

You can use the same channel with the following caveats:

Nuggets built from two branches obviously must have different (non-colliding) versions. I add the suffix 'dev' to the package built from the dev branch (for example, 1.2.3.4-dev) and leave the branch โ€œstableโ€ open.

You have to be explicit when you create the release, because by default Octopus will get the available version of nuget with the highest version, and it may not be the release you want (stable supposedly lags dev). Select the version of the package you need (and set the deployment version accordingly). If you are creating a release through TeamCity, make sure that you use the --packageVersion argument and set the release number.

Since the above only works if there is only one package in the release, the deployment process (unfortunately) should create one monolithic nuget, or you will get version mismatches.

The advantage of this kind of arrangement, of course, is that with a pinch you can push your dev construct to QA (or Prod) if necessary.

All this suggests that both branches are built as the same package , of course. You can create different packages between the dev and stable branches (but I donโ€™t think I recommend this because of duplication of the entire Octopus configuration).

Update: obviously you can use Octo.exe to specify different version numbers in different packages - see https://github.com/OctopusDeploy/Octopus-Tools .

+6
source

Source: https://habr.com/ru/post/951168/


All Articles