Closed rtprio closed 1 year ago
suggestion: validate and correct line endings. (CRLF to LF)
based on following experience: Yesterday had some long troubleshooting session regarding .lagoon.env.$branch environment variables. Long story short: it seemed that my .lagoon.env.dev file (local env. is on Windows) had CRLF line endings.
Bottom line: suggestion for change request: is there a way to protect developers (in mixed environments) from making this mistake. Eg. pro actively do a CRLF to LF conversion of .lagoon.env... files ?
Adding it here, so I remember: either truncate generated project at 63 characters or reject the build when it becomes that long.
this is an old library, but should partly assist.; http://rx.codesimply.com/index.html
Another reason why this would be useful
+++ cat .lagoon.yml
+++ shyaml get-value environments.production.cronjobs.2.service
Error: invalid path 'environments.production.cronjobs.2.service', missing key 'service' in struct.
The build managed to progress 58 seconds, and 1500 lines behind it was struck down with this. It would be great to do this up front.
Since we already have python in the build images, https://github.com/23andMe/Yamale looks like it would be a good solution
yup for the record yamale is also the tool used by helm for yaml linting/validation
The lagoon linter and build deploy tools now require YAML to be valid (and slightly correct) before deployment. It doesn't do a full schema check, but that's a separate issue.
I had the issue with the tls-acme and insecure for the routes. somehow my yaml linter is happy both ways. lagoon on the other hand is not.