0

I'm using Octopus and I want to trasform my files. However, these files aren't .config files. These are somehow different, reporting files to be exact .dtsConfig and .dtsx

I've tried it like a .config file but it doesn't work. What I've done is check the box in "XML Configuration-XML Variables" in my deploy nuget package step and add a configurationString variable in Variables.

How can I transform these using my octopus?

choopau
  • 2,209
  • 5
  • 21
  • 28

3 Answers3

0

A simple solution would be to leverage the preDeploy, Deploy and PostDeploy scripts to do some file manipulation.

PreDeploy -> rename the DTSConfig to .config

Either use the Deploy or the transformation files to do your changes.

PostDeploy -> rename it back to DTSConfig

Depending on your version of Octopus, you will have to either include the ps1 files (Pre/post/deploy) or have it embedded in the process/ step.

Kharaone
  • 597
  • 4
  • 16
0

I am using Octopus and have used to deploy SSIS Package while providing connection string values in .dtsconfig. You do not need to apply transform. Just use variables. This will go do the job.

Simply use #{Variables} in your .dtsconfig. See below an example #{TestVariable1}

dtsconfig:

  <?xml version="1.0" ?> 
- <DTSConfiguration>
- <DTSConfigurationHeading>
  <DTSConfigurationFileInfo GeneratedBy="Developer" GeneratedFromPackageName="SSIS_CashierTotals" GeneratedFromPackageID="{0AB76029-625B-49CC-8131-91F3512B17BC}" GeneratedDate="4/22/2010 1:28:15 PM" /> 
  </DTSConfigurationHeading>
- <Configuration ConfiguredType="Property" Path="\Package.Variables[User::sFileName].Properties[Value]" ValueType="String">
  <ConfiguredValue>#{TestVariable1}</ConfiguredValue> 
  </Configuration>
    </DTSConfiguration>

Specify the value for the variable #{TestVariable1} under Variables of your project in Octopus deploy.

Sam Tyson
  • 4,496
  • 4
  • 26
  • 34
0

You can supply variables in any file type no matter whether is .config or not! If file is not .config you need to do some additional steps. Apply following steps:

  • Add variable mapping to your file like this one #{MyVariable},
  • Specify that variable in Octopus variable set properly,
  • Don't forget to include that file in Octopus Deploy process! In process step click link "Configure Features", then check checkbox "Substitute variables in files". After you checked that check box you will see new text box "Target files" appeared in process step. In that text box provide file path!

Anyway, you can include in process PowerShell script which can do more powerful task. You can also with ps1 scrip change file name or what you want.

kat1330
  • 5,134
  • 7
  • 38
  • 61