I deployed my package in this path
my configuration transform file in octopus
but not working
Hi Yassine,
Sorry to hear your config transforms are not working as expected.
If possible can you send me the Octopus Server version youāre running and the Raw Task log from deployment which is not transforming the configuration correctly?
Is it possible that there is a mismatch in the naming convention of your Octopus Environment and that of the corresponding config transform? As an example if your package contains the configs below when deploying to an environment named " Test ", Octopus will execute the transforms in this order: YourService.exe.Release.config
, followed by YourService.exe.Test.config
, matching the environment from the config to the environment in the Octopus.
YourService.exe.config
YourService.exe.Release.config
YourService.exe.Test.config
Hereās a couple of links to our Config Transform documentation and our troubleshooting guide for more information.
Iāve made this a personal message to protect any sensitive information you may send through in your task logs, but if youād rather send them to our secure email at support@octopus.com thatās fine too.
Thanks for reaching out and I look forward to hearing from you shortly.
Kind Regards,
Tina
Hello,
Iām using Octopus :
V2019.13.7
Now itās working
I thought it was replacing the contents of one file with another.
For example replace :
All content of file
YourService.exe.Release.config
By
YourService.exe.Release.config
But the correct behavior is you must use the syntax: XML-Document-Transform for the sections to replace.
Is not possible to replace the contents of one file with another ?
Other question : In my package I have SQL script (insert, update, create ) I need to execute it by Octopus have you link to help me for this ?
Thanks All
Hi Yassine,
Glad to hear you were able to get this working. Your current understanding of Transform replacement is correct. Replace the contents of one file with another would require some custom scripting, as thereās no such feature out of the box. If you are just replacing one file for another you might want to rename the file, which you could do using a script inside of the package step and Rename the file.
As for running SQL scripts from your package, you do this by utilizing the āSQL- Execute Script Fileā Step seen below.
The SQL Script File
section in the step configuration expects a path to the script file. You can get the path that your package installs to by using an output variable, which would be followed by your script file name. In your SQL Script File
section, the value should look like the following (input your script file name):
#{Octopus.Action[Deploy Package].Output.Package.InstallationDirectoryPath}\ScriptFileName.sql
I hope this helps! Let me know if you have any further questions going forward.
Kind Regards,
Tina
Thank you for your response, the configuration of the name file works: smile:
About the SQL script, the octopus executes all files in āPath to script filesā but in descending order
Iām used āReg Ex Version File Nameā but i dāont know how to put syntax for sorting files
I would like execute my files in this order :
1-xxxx.sql
2-xxxx.sql
3-xxxx.sql
Thanks
Hi Yassine,
So sorry for the delay in getting back to you.
To execute the scripts in a particular sequence try naming scripts as seen below:
Script0001xxx.sql / Script0001-GetsomeTask.sql
Script0002xxx.sql / Script0002-UpdateSomeData.sql
Script0003xxx.sql / Script0003-ChangeUserAccess.sql
Iād also suggest refraining from using any special characters [^$.|?*+() in your filenames, as they have special meaning in Regex.
Hereās one more link that might be helpful as you move forward with database deployments.
Once again Iām very sorry for the delay in getting back to you. I hope this helps!
Tina
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.