harness / gitness

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
https://gitness.com
Apache License 2.0
31.89k stars 2.78k forks source link

Drone template extension invalid with .yaml and .yml #3489

Open joaostorrer opened 3 months ago

joaostorrer commented 3 months ago

I created a yaml file named test.yaml with this configuration:

kind: pipeline
type: docker
name: default
steps:
   - name: {{ .input.name }}
     image: {{ .input.image }}
     commands:
        - {{ .input.commands }}

But when I try to add the template with the command drone template add --namespace test --name test --data @test.yaml it raises this error:

client error 400: {"message":"Template extension invalid. Must be yaml, starlark or jsonnet"}

I tried to change the extension to .yml, execute the command without the "@", pass the full path of the file, but the error continues.

I'm using CentOS 7.