-
Notifications
You must be signed in to change notification settings - Fork 657
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 release property validation #2602
base: main
Are you sure you want to change the base?
Conversation
Releases can add a properties_schema.json file at the root of their jobs that is a json schema file. This schema will be used to validate deployment properties prior to template rendering during a deploy.
17fc797
to
8729145
Compare
if File.exist?(File.join(template_dir, 'properties_schema.json')) | ||
properties_schema = JSON.load_file(File.join(template_dir, 'properties_schema.json')) | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to start a trend of moving magic strings like 'properties_schema.json'
into constants.
return true if instance == "" | ||
begin | ||
OpenSSL::X509::Certificate.load(instance) | ||
rescue OpenSSL::X509::CertificateError => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should => e
be dropped here, or is that something we want to log, or otherwise capture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 don't think there is much in the way of valuable output here since it just "couldn't parse the cert", I think this was just muscle memory when typing rescue
, removed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exciting times
Releases can add a properties_schema.json file at the root of their jobs that is a json schema file.
This schema will be used to validate deployment properties prior to template rendering during a deploy.
The new integration test won't pass until a new bosh-cli is cut with 681