Mandatory ServiceConfiguration.cloud.cscfg?

Hi,

In my projects I have five different configurations being in order of deployement, DEV, QA, PERF, PRV and PRD.

From what I first understood, the cspkg configuration file must be named serviceconfiguration.cloud.cscfg.
From that I add a list of variables in Octopus and at deployment time, the values in the serviceconfiguration.cloud.cscfg are set to the Octopus variables values based on the deployment configuration selected (DEV or QA or PERF or PRV or PRD)
This works fine.

However I can see in the logs the following:

Running procedure ‘Delete temporary package files’ Verbose 09:37:14
Looking for target files for variable substitution… Verbose 09:37:14
Azure service configuration file not found: C:\Octopus\Applications\Development\BentleyConnectPortalAzure\2014.07.03.1_4\ServiceConfiguration.Dev.cscfg Verbose 09:37:14
Found Azure service configuration file: C:\Octopus\Applications\Development\BentleyConnectPortalAzure\2014.07.03.1_4\ServiceConfiguration.Cloud.cscfg Verbose 09:37:15

My deduction is that Octopus is looking for ServiceConfiguration.Dev.cscfg, if it doesn’t find it, it looks for ServiceConfiguration.Cloud.cscfg.

Does that mean that in my nuget package I could have all five cscfg file and Octopus will take the right one at deploy time based on the Deploy To value?

Like the following, look attached file.

If it’s true then I won’t have to fill in the cscfg variable list which is painful and error prone.

Thanks

Daniel

Hi Daniel,

Thanks for getting in touch!
You are correct, Octopus looks for ServiceConfiguration.Environment.cscfg and if it can’t find a specific environment one it falls back to ServiceConfiguration.cloud.cscfg

Hope this helps!
Vanessa

In my opinion this is a bug… and should be changed.

I should be able to specify in Octopus WHICH cscfg transform to run… and that be decoupled from the Octopus Environment.

Hi Kevin,

Thanks for getting in touch. This is an old thread but Octopus 3.x supports specifying which config file to use. If you create an Octopus project variable named Octopus.Action.Azure.CloudServiceConfigurationFileRelativePath and set its value to your config file name, then this will override the default behaviour described in this thread. This variable can then be scoped to environments, roles etc as needed.

Hope this helps.

Rob

Thanks Rob. I appreciate your note

@rob -

if my environment is ‘a’ and my config is: ServiceConfiguration.B.cscfg

Do I need the value of the param to be just ‘B’ or ServiceConfiguration.B.cscfg

Hi Kevin,

Thanks for the reply. If you received a blank reply, I apologise as I accidentally sent the reply before typing the answer.

I assume by param you mean the Octopus.Action.Azure.CloudServiceConfigurationFileRelativePath variable value. In this case, the variable value needs to be ServiceConfiguration.B.cscfg.

Hope this helps!

Rob