GoogleCloudPlatform / policy-library

A library of constraint templates and sample constraints for Constraint Framework tools
Apache License 2.0
224 stars 127 forks source link

Update makefile to add common dev tasks using opa docker image. #319

Closed gkowalski-google closed 4 years ago

gkowalski-google commented 4 years ago

Resolves #318

gkowalski-google commented 4 years ago

Alternatively, we could look at using the opa image in cloud build and using cloud-build-local to execute things at pre-submit time

@morgante @briantkennedy Let me know what your preference is. I was using the OPA image because I couldn't get the CV image working, but Morgante helped with that. I'm happy to make the changes. The motivation for me was to make it easy to run the tests on mac, where I frequently run into issues with certain software blocking me from running the OPA executable.

morgante commented 4 years ago

@morgante @briantkennedy Let me know what your preference is. I was using the OPA image because I couldn't get the CV image working, but Morgante helped with that. I'm happy to make the changes. The motivation for me was to make it easy to run the tests on mac, where I frequently run into issues with certain software blocking me from running the OPA executable.

I think we should use the same image in both. It'd probably be easiest for you to update the Makefile to use the CV image.

gkowalski-google commented 4 years ago

I've updated to run the tests using the CV rego image. Also added in targets to run the lint tests, check sample files, and check the formatting. Everything working for me locally.