Variable Substitution not finding specified file


I am attempting to use variable substitution in my AWS script as outlined here:

It seems exceptionally straight-forward. I enable the feature and entire the name of the file that I want to have variable substitutions in. However every time I get this:
No files were found that match the substitution target pattern ‘*.yaml’

I have tried wild cards, exact names of files, a single file; they all fail with that error. I have verified that the yaml files do exist in the artifact and am able to output the content the files from an inline script proving they exist.

I simply cannot think of any reason for the above error. Any help would be appreciated.
Octopus v2018.8.2

(Kenneth Bates) #3


Thanks for getting in touch! I’ve give this a test with yaml files in my local instance with successful results. Is it possible your yaml files have the .yml extension, which would cause them to not be found with the substitution pattern *.yaml? If you’re still hitting this issue, would you be willing to provide a copy of your verbose deployment logs with debugging variables enabled to shed more light on what could be causing this? The following doc page outlines how to produce and export this verbose log file.

You can mark this thread as private, or email us at support at octopus dot com if anything in the log file is considered sensitive. :slight_smile:

I look forward to hearing back and getting to the bottom of this one!

Best regards,



It is most definitely a .yaml file. Here is a snippet of the logs:

  • Extracting package ‘d:\octopus\OctopusServer\PackageCache\feeds-teamcity\Certica.DataConnect.K8s.Infrastructure.AwsAuth@S1.0.8-development@B1F95779C264FD49B8269C640310F52B.nupkg’ to ‘D:\octopus\Work\20181108013533-23049-41\Certica.DataConnect.K8s.Infrastructure.AwsAuth’
  • No files were found that match the substitution target pattern ‘*.yaml’
  • D:\octopus\Work\20181108013533-23049-41\Certica.DataConnect.K8s.Infrastructure.AwsAuth\aws-auth-cm.yaml

The first log entry is showing where the file was extracted to. The second log entry is the error stating that it could not find any yaml files. (Please note that I tried explicitly naming the file and it still did not find it.) And the last log entry is an output of what file it is looking for. I did not include an entry that showed the contents of the aforementioned file indicating that it is present.

If that is not enough to work with then I will get the full logs and email it to you.

(Kenneth Bates) #5


Thanks for following up! I think we may need to look through the log file directly to get the full context of your configuration, however I have a couple of ideas. They’re more shots in the dark, but maybe it’ll help for now. :slight_smile:

Is your yaml file in the package root? If not, try defining the full path relative to the installation directory (i.e. folder\file.yaml)
Are you using custom installation directory, and perhaps targeting this directory to perform substitution in? Substitution occurs before the copy to the custom directory (you can reference our package feature ordering doc page for more info), so you need to target the installation directory instead, which will then be copied to the custom directory.

I look forward to hearing back and getting to the bottom of this one!

Best regards,



Sorry for the delay getting back to you as I have been under the weather.

I found the issue. The documentation I found was for a package deployment and not a referenced package. This means I had to put in the entire path for the file to be found for variable substitution.


Once that was changed, everything worked as expected. Thank you for the assistance.

(Kenneth Bates) #7


Thanks for following up and letting me know the outcome! I’m sorry to hear you’ve been under the weather - the delay is no problem. That’s great to hear you’ve gotten it working as needed. Don’t hesitate to reach out if you have any questions or concerns in the future. :slight_smile:

Best regards,


(system) #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.