jobber icon indicating copy to clipboard operation
jobber copied to clipboard

CLI option to validate jobfiles

Open lurkie opened this issue 4 years ago • 2 comments

Today, we ran into an issue where a developer of our team entered an invalid time pattern, preventing our jobber container to start. Thinking about how to prevent this kind of errors in the future, I thought about validating the jobfile during CI without running the jobfile. Is such an option available? If not, please consider this a feature request.

lurkie avatar Dec 03 '20 10:12 lurkie

You can do this with jobber test [JOB NAME] when inside a container's runtime terminal /bin/sh

Pigpocket avatar Jul 12 '21 06:07 Pigpocket

Thanks for the suggesting. I've tried it today, with this result:

$ jobber test CronCleanupSessions
Running job "CronCleanupSessions"...
Jobber doesn't seem to be running for user $ME.
(No socket at /var/jobber/$UID/cmd.sock.): stat /var/jobber/$UID/cmd.sock: no such file or directory

Jobber is not running yet, as we want it to be during the CI build. jobber test would only be usable when the container has been deployed, but I want to prevent deploying an invalid Yaml file. An option to validate a Yaml file syntactically and semantically without an active daemon would still be desirable.

lurkie avatar Jul 15 '21 07:07 lurkie