uselagoon / build-deploy-tool

Tool to generate build resources
2 stars 5 forks source link

Validate all cronjobs across all environments are valid #243

Open seanhamlin opened 8 months ago

seanhamlin commented 8 months ago

Spotted in a deployment:

+++ cat .lagoon.yml
+++ shyaml get-value environments.production.cronjobs.3.service
Error: invalid path 'environments.production.cronjobs.3.service', missing key 'service' in struct.
++ CRONJOB_SERVICE=

So the cronjob was missing a required field service. This fails in step 13 in the deployment, it would be better I think to validate all cronjobs across all environments in the linter (which is much earlier in step 4).

In this particular situation, it impacted the production deployment, and was not able to be tested on development environments first. This leads to frustration from a developer experience perspective.

Bonus points would be making the error message friendlier as well.

shreddedbacon commented 8 months ago

Part of #27 Cronjobs

shreddedbacon commented 4 months ago

Will be resolved in #289 as it handles all cronjob creation