We have a Octopus project that contains many nuget packages. When we create a new Octopus release from TeamCity some of the packages in the release has a new version and some are unchanged.
In Octopus 1.6 this worked as expected so that Octopus only downloaded and deployed the new packages. Existing packages were not downloaded or deployed.
In Octopus 2.0 this does not work as expected. Octopus only download new packages so that is fine. But it always deploy all packages, both existing and new are deployed. This can not be right? How can I get this to work as it did in 1.6? I’ve tried to add the command line parameter --ignoreexisting but that does not help
How is this suppose to work in Octopus 2.0?
Thanks for getting in touch. We’ve added support for the original behaviour in an upcoming build, but it isn’t yet available for download. There’s some discussion on this issue here: https://github.com/OctopusDeploy/Issues/issues/426
Best regards,
Nick
It’s good to know that we get the original behaviour back. I don’t think we could have gone live with the current behaviour in 2.0 since it would lead to a lot of downtime during deployment. In what RC can I expect to see this fixed? When will it be available?
All the best,
Jan
Hi Jan,
We’ll have an RC with this setting available this week.
Regards,
Nick
I’ve installed the new RC now. How do I control if the packages in a release should use SkipIfAlreadyInstalled true or false? Is there a way to control this from commandline with Octo.exe? There are scenarios where we want all packages to be reinstalled and scenarios where we only want new packages to be installed.
In 1.6 the default was that only new packages was installed and I could override this with Octo.exe and the --force parameter. What do I have to do to get this working the same way in 2.0?
Regards,
Jan
Hi Jan,
You can set the flag on a per-environment or per-action basis using scoped variables.
We have an outstanding issue to add support to the Octo.exe command line and UI, feel free to add any info missing from the write-up here: https://github.com/OctopusDeploy/Issues/issues/454
Regards,
Nick
I’ve tried different ways of setting the SkipIfAlreadyInstalled variable on the project in the Octopus GUI. With and without scoping. I’ve also tried SkipIfAlreadyInstalled=true and SkipIfAlreadyInstalled =True in case it was case sensitive.
I’m not able to get this working with Octopus 2.0.10.1066. Existing packages are always redeployed. What exactly do I have to do to make this work? Can you provide some more details.
Hi Jan,
Have you created a new release since changing the variable? It will be included in release snapshots, so each change will require a new release to be created (or an old one to be “refreshed”).
If this continues to be a problem, can you please create a new release with the OctopusPrintEvaluatedVariables variable set to True? This will print the variables in the verbose log at each step, hopefully offering some clues to find what’s wrong.
Regards,
Nick
I figured out what I did wrong on this on. I called the variable SkipIfAlreadyInstalled when I should have called it Octopus.Action.Package.SkipIfAlreadyInstalled.
I would also like to be able to control SkipIfAlreadyInstalled per release with the use of octo.exe. In normal cases we would set SkipIfAlreadyInstalled=True as a project variable so that existing packages are not re-deployed.
But we also have some cases where we need to redeploy all packages in a release. In octopus 1.6 we have used octo.exe with the --force parameter to handle these cases(octo.exe deploy-release --force). So I would like to see the same functionality in 2.0 so I can use octo.exe to override the project variable setting and force a redeploy of all packages