Octopus 2.6: Other Transforms not working for multiple files using the same source transform file

The following “Other Transform” works:
NTScheduledTasks.Release.config => Export.config

However, if I have multiple target files that need to be updated by a common transform source, then only the first target file is affected:

NTScheduledTasks.Release.config => Export.config
NTScheduledTasks.Release.config => Import.config
NTScheduledTasks.Release.config => Cleanup.config
NTScheduledTasks.Release.config => OffsiteCopy.config
NTScheduledTasks.Release.config => Export2.config
NTScheduledTasks.Release.config => Export3.config
NTScheduledTasks.Release.config => Import2.config
NTScheduledTasks.Release.config => Import3.config
NTScheduledTasks.Release.config => Backup.config

and if instead I use
NTScheduledTasks.Release.config => *.config
then no tranforms occur at all.

I realize that I may be using the “Other Transforms” feature in an unexpected manner; however, it would be nice if “Other Transforms” would handle making changes to multiple targets from a single source transform file.
Our use case is that we have NT scheduled task xml files that all need to be updated in the same way before using the
powershell cmdlet “Register-ScheduledTask” to import the xml file.

I have a powershell solution which is what I probably should have done in the first place.

Param(
[string]$FileName = “AppServer\Import.config”,
[string]$Author = “Octopus Deploy”,
[string]$Enabled = “false”
)

$Path="$PSScriptRoot$FileName"
$xml = [xml](Get-Content $Path)
$xml.Task.Principals.Principal.UserId = $Author
$xml.Task.RegistrationInfo.Author = $Author
$xml.Task.Settings.Enabled = $Enabled
$xml.Save($Path)

Hi,

Thank you for reaching out! I’m glad you got it working with your PowerShell solution! That is the only way to accomplish this as of your version. We’re aware that it’s a bit of a bug before 3.2.17 (when this was fixed). Have you considered an upgrade? We have made lots of changes to config transforms, and this is possible without that PowerShell workaround in that version and later :slight_smile: If you are considering it, we have some good documentation about upgrading from 2.6!

Kind regards,

Kenny

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.