From c66138e27f721e515fd7134fa2769d434b165e0a Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Mon, 6 May 2024 22:46:52 +0200 Subject: [PATCH] CORS-3477: hack: build capi + providers by default. Always build capi providers in the Installer so we can deprecate/remove the terraform providers. --- docs/dev/cluster-api.md | 4 +--- hack/build-cluster-api.sh | 5 ----- hack/build.sh | 6 ++---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/dev/cluster-api.md b/docs/dev/cluster-api.md index 9a05af6f04..def889987e 100644 --- a/docs/dev/cluster-api.md +++ b/docs/dev/cluster-api.md @@ -24,12 +24,10 @@ At a high level, the local control plane is responsible for: The Cluster API system is formed of a set of binaries. The core Cluster API manager, and the infrastructure providers are built using Go Modules in the `cluster-api` folder. The binaries are built and packaged during the standard installer build process, `hack/build.sh`. Cluster API specific build flow is contained in the `hack/build-cluster-api.sh` script: -- Only enabled if the `OPENSHIFT_INSTALL_CLUSTER_API` environment variable is set. - Builds (as needed) every binary listed as a Go Module in the `cluster-api` folder. - Downloads (as needed) the specified version of `envtest` to package `kube-apiserver` and `etcd`. - Produces a single `cluster-api.zip` file which is then copied in `pkg/clusterapi/mirror`. To build an `openshift-install` binary with Cluster API bundled: -- Set `export OPENSHIFT_INSTALL_CLUSTER_API=y` - - Optionally `export SKIP_TERRAFORM=y` if you don't need to use Terraform. +- Optionally `export SKIP_TERRAFORM=y` if you don't need to use Terraform. - Run `./hack/build.sh`, the binary is then produced in `bin/openshift-install`. diff --git a/hack/build-cluster-api.sh b/hack/build-cluster-api.sh index d0c8a55d51..c72c2a76a6 100644 --- a/hack/build-cluster-api.sh +++ b/hack/build-cluster-api.sh @@ -2,11 +2,6 @@ set -e -# Check if the OPENSHIFT_INSTALL_CLUSTER_API is not empty. -if [ -z "${OPENSHIFT_INSTALL_CLUSTER_API}" ]; then - return -fi - TARGET_OS_ARCH=$(go env GOOS)_$(go env GOARCH) CLUSTER_API_BIN_DIR="${PWD}/cluster-api/bin/${TARGET_OS_ARCH}" CLUSTER_API_MIRROR_DIR="${PWD}/pkg/clusterapi/mirror/" diff --git a/hack/build.sh b/hack/build.sh index 1411db143f..8ad92142d9 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -80,10 +80,8 @@ then fi # build cluster-api binaries -if [ -n "${OPENSHIFT_INSTALL_CLUSTER_API}" ]; then - make -C cluster-api all - copy_cluster_api_to_mirror -fi +make -C cluster-api all +copy_cluster_api_to_mirror GIT_COMMIT="${SOURCE_GIT_COMMIT:-$(git rev-parse --verify 'HEAD^{commit}')}" GIT_TAG="${BUILD_VERSION:-$(git describe --always --abbrev=40 --dirty)}"