From 5dbb7de429177091288aa9ab6f65850f6dc41978 Mon Sep 17 00:00:00 2001 From: Naadir Jeewa Date: Wed, 20 Feb 2019 22:35:58 +0000 Subject: [PATCH] bazel: Expand make variables in stateful_set_patch (#586) Signed-off-by: Naadir Jeewa --- .bazelrc | 1 - build/stateful_set_patch.bzl | 8 ++++---- test/BUILD.bazel | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.bazelrc b/.bazelrc index e26922fd95..37cb81abd0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -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 diff --git a/build/stateful_set_patch.bzl b/build/stateful_set_patch.bzl index 56b98e55e7..fefd38102e 100644 --- a/build/stateful_set_patch.bzl +++ b/build/stateful_set_patch.bzl @@ -24,10 +24,10 @@ def _stateful_set_patch_impl(ctx): template = ctx.file._template, output = ctx.outputs.source_file, substitutions = { - "": ctx.attr.registry, - "": ctx.attr.image_name, - "": ctx.attr.tag, - "": ctx.attr.pull_policy, + "": ctx.expand_make_variables("registry", ctx.attr.registry, {}), + "": ctx.expand_make_variables("image_name",ctx.attr.image_name, {}), + "": ctx.expand_make_variables("tag", ctx.attr.tag, {}), + "": ctx.expand_make_variables("pull_policy",ctx.attr.pull_policy, {}), }, ) diff --git a/test/BUILD.bazel b/test/BUILD.bazel index c591431bd9..8592f6b94b 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -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"], )