mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
CORS-3516: hack: do not execute cross-compiled binaries
We cannot execute cross-compiled binaries, otherwise we get an error saying: ``` hack/build-cluster-api.sh: line 26: /go/src/github.com/openshift/installer/cluster-api/bin/darwin_amd64/kube-apiserver: cannot execute binary file: Exec format error ``` The check should be skipped in those cases.
This commit is contained in:
@@ -23,6 +23,10 @@ copy_cluster_api_to_mirror() {
|
||||
|
||||
sync_envtest() {
|
||||
if [ -f "${CLUSTER_API_BIN_DIR}/kube-apiserver" ]; then
|
||||
if [ "$(go env GOOS)" != "$(go env GOHOSTOS)" ] || [ "$(go env GOARCH)" != "$(go env GOHOSTARCH)" ]; then
|
||||
echo "Found cross-compiled artifact: skipping envtest binaries version check"
|
||||
return
|
||||
fi
|
||||
version=$("${CLUSTER_API_BIN_DIR}/kube-apiserver" --version | sed 's/Kubernetes //' || echo "v0.0.0")
|
||||
echo "Found envtest binaries with version: ${version}"
|
||||
if printf '%s\n%s' v${ENVTEST_K8S_VERSION} "${version}" | sort -V -C; then
|
||||
|
||||
Reference in New Issue
Block a user