I’m trying to test out the way templates work and I’m having trouble with the basics. I’m using the CLI tools v1.5.0 and configured them as shown here. I can list templates if I add them via the web interface.
I want to add a simple YAML template, but the syntax described in the docs doesn’t work. For example:
drone template add ryanjaeb my_template mytemplate.yaml
Outputs:
missing namespace
I need to use the options syntax described here. Ex:
drone template add --namespace ryanjaeb --name my_template mytemplate.yaml
However, I can never get past the following error, no matter what kind of syntax I try for supplying the file name.
client error 400: {"message":"Template extension invalid. Must be yaml, starlark or jsonnet"}
I’ve tried it in both Windows and Linux. What am I doing wrong?
I’m also wondering how the namespaces are scoped. In the UI, I have to add a template from the settings of a project, but it’s under the organization section. Does that mean the template is only usable for that project or can I use it for any project in the organization? Also, is there a way to have a globally usable template?
Thanks in advance for the help!