-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add support for YAML 1.2 #517
Comments
I'd be more than happy to lend a hand if you decide to take one of the options I described :) |
We are mainly using My suggestion would be to replace https://github.com/ghodss/yaml by something using |
I've just made pull request #556 to document the present support for YAML 1.1 and that YAML 1.2 support is being added! :) |
@seabass-labrax can you paste an 1.2 yaml example to test against here? |
* close #517 * sed -i 's/Yaml/YAML/g' * Update docs/docs/20-usage/10-intro.md Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
We mostly do support yaml 1.2 but not completly :/ |
only else you get this has to do with https://gopkg.in/yaml.v3 lib |
Clear and concise description of the problem
It would be convenient to be able to use YAML 1.2 for
.woodpecker.yml
and other such workflow files. I believe many users are likely to assume that Woodpecker supports the latest version of YAML, but it currently supports only YAML 1.1 (which was published in 2005).Adding an explicit version directive (
%YAML 1.2
) to.woodpecker.yml
results in the CI not being run, and the CI status not being shown at all in the Gitea (Codeberg) user interface. Woodpecker's own user interface displays the following error message:This message is generated by the
go-yaml
library, in itsyaml/parserc.go
file.Suggested solution
We could use a different YAML parsing library which does support YAML 1.2, or contribute support for YAML 1.2 upstream. This may be related to an existing issue and pull request relating to YAML support:
#352
#384
Alternative
We could also update the documentation to make it clear that only YAML 1.1 is supported. Currently, it is potentially confusing that the 'Getting Started' page on the Woodpecker documentation says that the format "is a superset of the widely used docker-compose file format", despite the fact that Docker Compose does support YAML 1.2.
Additional context
This is the error message I referred to earlier:
...and this is a pop-up message that appears if one tries to restart the failed build:
Validations
The text was updated successfully, but these errors were encountered: