From 8eb3515341cf6a9d5826c6c3b4bafd70a28b3354 Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:26:40 +0100 Subject: [PATCH] devbuild: only build terraform provider if enterprise flag is set --- bazel/devbuild/BUILD.bazel | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/bazel/devbuild/BUILD.bazel b/bazel/devbuild/BUILD.bazel index 27afb1347..684323e65 100644 --- a/bazel/devbuild/BUILD.bazel +++ b/bazel/devbuild/BUILD.bazel @@ -10,12 +10,17 @@ sh_template( "//bootstrapper/cmd/bootstrapper:bootstrapper_patched", "//cli:cli_edition_host", "//debugd/cmd/cdbg:cdbg_host", - "//terraform-provider-constellation:terraform_rc", - "//terraform-provider-constellation:tf_provider", "//upgrade-agent/cmd:upgrade_agent_linux_amd64", "@gnused//:bin/sed", "@yq_toolchains//:resolved_toolchain", - ], + ] + select( + { + "//bazel/settings:cli_edition_enterprise": [ + "//terraform-provider-constellation:terraform_rc", + "//terraform-provider-constellation:tf_provider", + ], + }, + ), substitutions = { "@@BOOTSTRAPPER@@": "$(rootpath //bootstrapper/cmd/bootstrapper:bootstrapper_patched)", "@@CDBG@@": "$(rootpath //debugd/cmd/cdbg:cdbg_host)", @@ -23,8 +28,6 @@ sh_template( "@@CONTAINER_SUMS@@": "$(rootpath //bazel/release:container_sums)", "@@EDITION@@": "$(rootpath :devbuild_cli_edition)", "@@SED@@": "$(rootpath @gnused//:bin/sed)", - "@@TERRAFORM_PROVIDER@@": "$(rootpath //terraform-provider-constellation:tf_provider)", - "@@TERRAFORM_RC@@": "$(rootpath //terraform-provider-constellation:terraform_rc)", "@@UPGRADE_AGENT@@": "$(rootpath //upgrade-agent/cmd:upgrade_agent_linux_amd64)", "@@VERSION_FILE@@": "$(rootpath //bazel/settings:tag)", "@@YQ@@": "$(rootpath @yq_toolchains//:resolved_toolchain)", @@ -42,7 +45,14 @@ sh_template( "@platforms//cpu:x86_64": { "@@GOARCH@@": "amd64", }, - }), + }) | select( + { + "//bazel/settings:cli_edition_enterprise": { + "@@TERRAFORM_PROVIDER@@": "$(rootpath //terraform-provider-constellation:tf_provider)", + "@@TERRAFORM_RC@@": "$(rootpath //terraform-provider-constellation:terraform_rc)", + }, + }, + ), template = "prepare_developer_workspace.sh.in", visibility = ["//visibility:public"], )