Package Deployment section in deployment is missing

Im using version 2021.1.7665 and some projects have the “Package Deployment” section with the option “Re-deploy already installed packages”
But some dont have at all the package deployment ui section, when you are in the release to deploy, what is wrong?

HI @fbrunetgirard,

Thanks for getting in touch! Great question, and I think it would be due to a relatively recent change where we removed the Package Redeployment option from the project settings that you can reference at this link.

Note the default behavior is for the Tentacle to re-install already installed packages during the deployment. So to override this default you would need to create the following project variable: Octopus.Action.Package.SkipIfAlreadyInstalled with a value of True.

I hope this helps, and please let us know if you have any further questions or concerns going forward.

Best regards,

Kenny

Then why i still have the UI for some projects?

Hi @fbrunetgirard,

Thanks for following up, and really good question. I’m not actually seeing it in my projects, though in this local instance they’re all relatively new projects. My guess would be this option was retained for older already existing projects in order to maintain backwards compatibility as that sudden change could potentially be alarming. Have you noticed any correlation with the projects that have that UI option and those that don’t in regards to the age of the projects? I’m going to keep looking for an answer, but let me know what you think.

Best regards,

Kenny

I used to be able to set this option somewhere for a new project, but I dont remember where, maybe this was removed from the UI

Hi @fbrunetgirard,

That’s correct, this redeployment option was removed from the UI. To skip redeploying the packages that are already installed, this would now have to be done by creating a project variable named Octopus.Action.Package.SkipIfAlreadyInstalled and set its value to True. Note that this variable has a value of False by default, so this new project variable would override that. In addition, any changes to your deployment process or project variables like this requires a new release of the project to be created to apply those changes.

I hope that helps!

Best regards,

Kenny

How can i used a prompted variable with this ?

Hi @fbrunetgirard,

Yes, it’s possible to use a prompted variable to set this system variable for a project. You should be able to add a prompted variable to the project, and use the value of it to set Octopus.Action.Package.SkipIfAlreadyInstalled .

For example, my test project variables look like this:

The SetPackageOption_Prompted is just a Plain Text variable with ‘Prompt for value’ selected, and for this example I’ve used a default of ‘False’:

The Octopus.Action.Package.SkipIfAlreadyInstalled variable is then substituted using the value of SetPackageOption_Prompted.

You can find out more about variable substitutions here: Variable substitutions - Octopus Deploy

During your deployment process, you should be able to select the value for the prompted variable and Octopus.Action.Package.SkipIfAlreadyInstalled will reflect it:

I’ve used just a simple Write-Host statement to verify this:

I hope you find this helpful, and let us know if you have any further questions.

Best,
Patrick

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.