Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml include for upsun projects #4239

Open
gilzow opened this issue Oct 28, 2024 · 0 comments
Open

yaml include for upsun projects #4239

gilzow opened this issue Oct 28, 2024 · 0 comments

Comments

@gilzow
Copy link
Collaborator

gilzow commented Oct 28, 2024

Where on docs.platform.sh should be changed?

https://docs.upsun.com/learn/overview/yaml/yaml-structure.html

What exactly should be updated?

Make a (or add to the existing) note that if you use yaml !includes in your main upsun config file, they need to be either stored in a different directory (or subdirectory of .upsun) and/or use a different file extension other than *.yaml.

Additional context

In Upsun, we glob all files located directly under the .upsun/ directory regardless of their names, and merge them into one single structure. In Platform we do not do this so including a yaml file (stored potentially in ./.platform) in your main .platform.app.yaml file is perfectly fine. In Upsun however, this will throw an error.

Example:
"main" upsun config file (e.g. config.yaml)

applications:
  my_project:
    hooks:
      build: !include
        type: string
        path: hooks.build.yaml

where hooks.build.yaml is also stored in .upsun will produce an error Contents should be a YAML map.

Instead, hooks.build.yaml should either be moved into a different directory (or a descendent/sub directory of .upsun) OR have its file extension changed to something other than .yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant