mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
CORS-3477: hack: build capi + providers by default.
Always build capi providers in the Installer so we can deprecate/remove the terraform providers.
This commit is contained in:
@@ -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`.
|
||||
|
||||
@@ -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/"
|
||||
|
||||
@@ -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)}"
|
||||
|
||||
Reference in New Issue
Block a user