Allow for wildcard directory searching for substitute variables in files
We need the ability to allow for wildcard searching of files within the substitute variables in files feature, such as '**.config'
Source: UV ticket 871

Hi everyone,
Thanks for your input on this request.
Version 3.11.8 now supports wild cards and extended wild card patterns via the ‘Target Files’ UI elements on these 2 configuration additions: ‘Substitute variables in files’ and ‘JSON configuration variables’.
When you try it out let us know if you encounter any issues, either via the support channels or on the github issue.
More details here: https://github.com/OctopusDeploy/Issues/issues/3269
Update: we tried to support full globbing syntax but it broke behavior for customers who had folders with square brackets as part of the name.
-
Adam commented
What makes it worse: when you DO specify multiple paths, if one of those paths is the removed from the codebase, the deployment breaks because it cant find the path anymore. :( I thought I would try to be smart and create a variable that had all of our config paths in it so that I could just clone a project ... nope.
-
Alexander Trauzzi commented
This needs to happen sooner rather than later. I don't understand why recursive glob support was specifically disabled. Don't wrap my hands in foam as this ticket (http://help.octopusdeploy.com/discussions/problems/39746-substitute-variables-in-files-recursive-octopus-312) states: "Unfortunately I have to tell you that the fact that we don't do recursive search like that is absolutely a design decision."
Let me set up my builds the way I need. Just implement the fix your own user has provided here: http://help.octopusdeploy.com/discussions/problems/39746-substitute-variables-in-files-recursive-octopus-312#comment_40223525
-
Gabriel commented
It would be very helpful when you are adding components with ".config's" to avoid constantly editing the Target Files box inside Susbtitute Variables in files
-
Matt Richardson commented
Another way of phrasing this might be to say "allow for recursive directory searching".
This is supported in the ConfigurationVariablesConvention - https://github.com/OctopusDeploy/Calamari/blob/e90bf0c10bfffd9f390c1f0275ceff6848eee125/source/Calamari/Deployment/Conventions/ConfigurationVariablesConvention.cs#L28 and in the ConfigurationTransformsConvention - https://github.com/OctopusDeploy/Calamari/blob/e90bf0c10bfffd9f390c1f0275ceff6848eee125/source/Calamari/Deployment/Conventions/ConfigurationTransformsConvention.cs#L46, but it is not recursive for the SubstituteInFilesConvention - https://github.com/OctopusDeploy/Calamari/blob/e90bf0c10bfffd9f390c1f0275ceff6848eee125/source/Calamari/Deployment/Conventions/SubstituteInFilesConvention.cs#L26.
It would be good for these to be consistent, and it would make life easier than having to specify multiple paths in this field.
-
Dave Soane commented
Would be very useful.