You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When utilising file template functions such as fileContents it is preferable to specify the path relative to the pack. This causes problems when running across different environments such as a developer laptop or CI SaaS platform. Ideally we would provide a function or piece of data to allow specifying this relative path which is converted at render time to an absolute path.
The text was updated successfully, but these errors were encountered:
Im trying to use nomad pack and want to split out config files and use fileContents to include them. This does not seem to work at all. fileContents seems to be relative to the working directory of the caller. Is there currently any way to include files relative to the pack?
@malmz@jrasell I too have the same concern. All fileContents function seem to take files from the caller, and not from the repository. I think for now the workaround is static files can be converted into templates first with define and be imported with template function instead of using fileContents.
I took an alternative here by creating a packFileContentstemplate function.
I looked at putting it into metas but that seems to map to metadata.hcl so it didn't seem correct to place it there. That said, maybe a packPath is better, as then that could reference anything in the pack's directory as opposed to just the templates subfolder. I'll update my PR.
When utilising file template functions such as
fileContents
it is preferable to specify the path relative to the pack. This causes problems when running across different environments such as a developer laptop or CI SaaS platform. Ideally we would provide a function or piece of data to allow specifying this relative path which is converted at render time to an absolute path.The text was updated successfully, but these errors were encountered: