Skip to content
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

Adding Label based predicates #1

Merged
merged 3 commits into from
Jul 11, 2019
Merged

Adding Label based predicates #1

merged 3 commits into from
Jul 11, 2019

Conversation

byxorna
Copy link
Contributor

@byxorna byxorna commented Jul 10, 2019

This is a large refactor to clean things up before opensourcing, and adds a new feature: Docker label based selectors! If you use LABEL foo=bar in your Dockerfile, you can use a label: rule to filter all Manifests that have that label set present and apply an action to them in bulk.

refactor to make this make a bit more sense maybe

removing small jawn

refactoring and trying to fix test cases

fixing tests

improving tests

tweaks

moving more tests into yaml configs

better tests

dont cache test results

updating tests to make matching predicate on labels work

adding docs
@byxorna byxorna force-pushed the gabe/label-predicates branch from 647990b to ddd7144 Compare July 10, 2019 18:10
@byxorna byxorna requested review from alex-laties and defect July 10, 2019 18:58
@@ -63,10 +64,10 @@ test-race: ARGS=-race ## Run tests with race detector
$(TEST_TARGETS): NAME=$(MAKECMDGOALS:test-%=%)
$(TEST_TARGETS): test
check test tests: fmt lint vendor | ; $(info $(M) running $(NAME:%=% )tests…) @ ## Run tests
$Q $(GO) test -timeout $(TIMEOUT)s $(ARGS) $(TESTPKGS)
$Q $(GO) test -count=1 -timeout $(TIMEOUT)s $(ARGS) $(TESTPKGS)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth noting why you're disabling test caching here. I think it's a good idea but most won't understand what -count=1 is doing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing test configuration into yaml files means when the test config changes, go isnt smart enough to know to invalidate the cache :/

@byxorna byxorna merged commit ec3cdec into master Jul 11, 2019
@komapa komapa deleted the gabe/label-predicates branch July 12, 2019 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants