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

bazel: Expand make variables in stateful_set_patch #586

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
build --define=MANAGER_IMAGE_NAME=cluster-api-aws-controller
build --define=MANAGER_IMAGE_TAG=0.1.0
build --define=REGISTRY_STABLE=gcr.io/cluster-api-provider-aws
build --define=REGISTRY_TEST_SHIM=bazel/cmd

build --workspace_status_command=./hack/print-workspace-status.sh
build --verbose_failures
Expand Down
8 changes: 4 additions & 4 deletions build/stateful_set_patch.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def _stateful_set_patch_impl(ctx):
template = ctx.file._template,
output = ctx.outputs.source_file,
substitutions = {
"<registry>": ctx.attr.registry,
"<image_name>": ctx.attr.image_name,
"<tag>": ctx.attr.tag,
"<pull_policy>": ctx.attr.pull_policy,
"<registry>": ctx.expand_make_variables("registry", ctx.attr.registry, {}),
"<image_name>": ctx.expand_make_variables("image_name",ctx.attr.image_name, {}),
"<tag>": ctx.expand_make_variables("tag", ctx.attr.tag, {}),
"<pull_policy>": ctx.expand_make_variables("pull_policy",ctx.attr.pull_policy, {}),
},
)

Expand Down
2 changes: 1 addition & 1 deletion test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stateful_set_patch(
name = "manager-version-patch",
image_name = "manager",
pull_policy = "Never",
registry = "$(REGISTRY_TEST_SHIM)",
registry = "bazel/cmd",
tag = "manager-amd64",
visibility = ["//visibility:public"],
)