Add support of bazel tags to rules_gitops #148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add ability to use bazel tags on k8s_deploy targets so can use bazel tag filters on these targets to include or exclude from building.
Related Issue
#144
Motivation and Context
This enables including or excluding k8s_deploy targets based on build tag filters as well as other common tag based bazel operations like bazel query.
In particular, containers can be expensive to build. I can tag my container_images and then use build tag filters to ignore building those, but if they are used in a k8s_deploy, they cannot be excluded through a tag filter.
How Has This Been Tested?
I've tested this in my own project via
--build_tag_filter=-excluded
)"excluded"
tag on both thecontainer_image
andk8s_deploy
targetAlso, I added usage of
tags
to the helloworld example for basic smoke test of functionalityWithout this change, it would fail building (
bazel build --build_tag_filter=-excluded //...
), while with this change, it would pass with the same command.Types of changes
Checklist: