The first deploys the web.config and applies transforms as usual.
The second step also needs to transform the web.config that was just deployed by step 1. It has a transform file but does not have the web.config because that is in the first project.
How should i setup the project or steps to do the normal transformations so that the first and second steps transform the one web.config.
In order for this to work, you’ll need the deploy package step containing webthree.config to action first, (or in your example web.config.Project2.transform), this is because you will need to specify an absolute path in your Configuration Transforms area of the second step.
I’ve included screenshots below to highlight this;
Hey Reece,
Wow, like magic! Thanks so much for that. That works.
That takes care of it.
However, I would like to try to do it without explicitly specifying each config files source and destination because I didn’t tell you that I have a bunch of configs and specifying all of them seems error prone.
Bring the web.config back into the source directory after the package is unzipped and before the transform happens in the source directory, then allow the transform to take place and then have it copied back as if it were part of the package being delivered?
Or Have a post process run after all the transform files have been copied over to the destination and transform that directory. (No existing packages do what octopus does which is to allow wildcards with a base directory)
Or Have all the package steps unzip into the same directory and then transform and then copy to the destination after the transform has happened even though it would do it multiple times, ie once for each package.
I greatly appreciate your detailed breakdown and patience,
Based on the information provided in your query, I’ve linked below the advanced configuration example for using an absolute path wildcard transform for multiple targets (I’m conscious you mentioned you looked at this in your earlier post, however)
Out of your three suggestions, the third option looks to be the least complex (without packaging things differently to avoid specifying each source) you can specify a CustomInstallationDirectory via the Deploy Package Step - Features to have the Transformed files copy across to the destination folder after the transform has happened, though this would occur for each package.
If I’ve misunderstood in any way, or you require further assistance please let me know
I include the following script on each deploy files step and it works perfectly. Now I get the benefit of the normal wildcards and multiple transforms for the same file from different packages.
Thanks for the help
<#
.SYNOPSIS
copies the transform targets to the local deployment source folder.
#>