Open Mierdin opened 5 years ago
For the script to check, I was looking into https://github.com/23andMe/Yamale for validating yaml files. It goes beyond just checking the schema and has the option to use regex to validate strings. This could be useful here.
I am not sure yet how to properly handle the
Should be fairly thoughtful about this though, as new PRs will still need to use external repositories for testing before they're merged
part yet.
For validation of the lesson definition as a whole, definitely check out the syrctl docs; there are a lot of things to check to see if a lesson is valid, including but not limited to validating the YAML file, and we bake this into the syrctl validate
command, which (I believe) we call as part of the curriculum CI process.
Not sure why I was so concerned about being thoughtful about the fact that folks will want to use external repositories - that's totally fine, their PR will just fail CI until they fix it, which ideally they'll do when they've finished testing on their end. The requirement that images come from antidotelabs
is specific to the NRE Labs curriculum, so we likely don't want to bake this into Syringe, so we can probably just grep
for the image lines.
I was going to comment about the syrctl possibly being able to handle this, but I haven't been through that code. A grep
should work just fine and not add any dependencies.
Should add a script to ensure no image in use in this curriculum is using an org other than
antidotelabs
. Should be fairly thoughtful about this though, as new PRs will still need to use external repositories for testing before they're merged