3
votes

We're testing Octopus Deploy 2.0 (OD) to deploy web services, windows services and citrix applications.

QUICK QUESTION: When using config transformation, can parameters be used to indicate which config file should be used for the transformations?

MORE DETAIL: When setting up for config transformations, we would like to have files named

  • MyApp.DEV_US.config
  • MyApp.DEV_CANADA.config
  • MyApp.DEV_AUSTRALIA.config
  • and so on for TEST, STAGE and PRODUCTION

Our deployments to DEV, for example, always include deployments to all regions. So we would prefer if OD environments were DEV, TEST, STAGE and PRODUCTION. Then in each deployment, we have multiple steps that deploy to each region.

However, OD config transformations only look for OD Environments when looking for which config files to use as part of the transformation. It seems OD would require us to bring each region up to the environment level, which from our POV is not ideal and would clutter the dashboard.

Can we pass parameters into the config transformation process such that we can indicate which file to use for the transform?

1

1 Answers

2
votes

I believe you can achieve what you are after with the following, but it will require multiple steps in the process.

Create a step called Deploy to Dev - US and a step called Deploy to Dev - Canada

Screen shot

Now define a variable called CountrySpecificConfigFiles and you can scope it to the required step (and environment etc)

Screen shot

In the Configuration transformations section for each Steps, choose the variable defined in the step above

Screen shot

You could abstract this further by naming your steps DEV_US and DEV_CANADA and define just the one variable value as Web.#{Octopus.Task.Name}.config without any scope to steps, or by removing the variable and doing it inline in the Additional Transforms field.