defenseunicorns / delivery-aws-iac

Apache License 2.0
16 stars 5 forks source link

ADR on our branch protection settings #320

Closed RothAndrew closed 1 year ago

RothAndrew commented 1 year ago

Differences between what the settings are right now and what this documents (to discuss when we meet up next)

zack-is-cool commented 1 year ago

Can we have the e2e test run (meaning specifically the makefile running go test underdelivery-aws-iac/test/e2e) only if appropriate files are changed? What would those files be (.tf, .tfvars,.gosomething)? How can we incorporate that logic in the pipeline?

example: we don't need to test e2e if we update a readme for spelling mistakes or clarity, modify a pre-commit hook, etc.

RothAndrew commented 1 year ago

Can we have the e2e test run (meaning specifically the makefile running go test underdelivery-aws-iac/test/e2e) only if appropriate files are changed? What would those files be (.tf, .tfvars,.gosomething)? How can we incorporate that logic in the pipeline?

example: we don't need to test e2e if we update a readme for spelling mistakes or clarity, modify a pre-commit hook, etc.

The issue with this is that if we make the tests a required status check and they don't run because only a certain file type was changed then the PR won't be mergeable. It is possible to do but it requires additional logic in the job itself to check which files were changed and then bail out of the test early with a successful result if, for example, only markdown files were changed.

We can add that logic but I'd prefer to do it as an incremental enhancement rather than up front