Skip to content

Commit

Permalink
Merge pull request kubevirt#9859 from rmohr/virtcl-native-by-default
Browse files Browse the repository at this point in the history
Limit virtctl builds during development to native architecture
  • Loading branch information
kubevirt-bot authored Jun 8, 2023
2 parents 4d7659a + 588306c commit 1b1a335
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bazel-generate:
SYNC_VENDOR=true hack/dockerized "./hack/bazel-generate.sh"

bazel-build:
hack/dockerized "export BUILD_ARCH=${BUILD_ARCH} && export DOCKER_TAG=${DOCKER_TAG} && hack/bazel-fmt.sh && ./hack/multi-arch.sh build"
hack/dockerized "export BUILD_ARCH=${BUILD_ARCH} && export DOCKER_TAG=${DOCKER_TAG} && export CI=${CI} && export KUBEVIRT_RELEASE=${KUBEVIRT_RELEASE} && hack/bazel-fmt.sh && ./hack/multi-arch.sh build"

bazel-build-functests:
hack/dockerized "hack/bazel-fmt.sh && hack/bazel-build-functests.sh"
Expand Down
3 changes: 2 additions & 1 deletion automation/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function ensure_gh_cli_installed() {
gh config set prompt disabled
}

BUILD_ARCH=aarch64,x86_64
export BUILD_ARCH=aarch64,x86_64
export KUBEVIRT_RELEASE=true

function build_release_artifacts() {
make
Expand Down
28 changes: 15 additions & 13 deletions hack/bazel-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,22 @@ bazel run \

# compile virtctl for amd64 and arm64

# linux
bazel run \
:build-virtctl-amd64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-linux-amd64
if [[ "${KUBEVIRT_RELEASE}" == "true" || "${CI}" == "true" ]]; then
# linux
bazel run \
:build-virtctl-amd64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-linux-amd64

bazel run \
:build-virtctl-arm64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-linux-arm64
bazel run \
:build-virtctl-arm64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-linux-arm64

# darwin
bazel run \
:build-virtctl-darwin -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-darwin-amd64
# darwin
bazel run \
:build-virtctl-darwin -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-darwin-amd64

bazel run \
:build-virtctl-darwin-arm64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-darwin-arm64
bazel run \
:build-virtctl-darwin-arm64 -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-darwin-arm64

# windows
bazel run \
:build-virtctl-windows -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-windows-amd64.exe
# windows
bazel run \
:build-virtctl-windows -- ${CMD_OUT_DIR}/virtctl/virtctl-${KUBEVIRT_VERSION}-windows-amd64.exe
fi
1 change: 1 addition & 0 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ PYTHON_CLIENT_OUT_DIR=$OUT_DIR/client-python
ARCHITECTURE="${ARCHITECTURE:-$(uname -m)}"
HOST_ARCHITECTURE="$(uname -m)"
KUBEVIRT_NO_BAZEL=${KUBEVIRT_NO_BAZEL:-false}
KUBEVIRT_RELEASE=${KUBEVIRT_RELEASE:-false}
OPERATOR_MANIFEST_PATH=$MANIFESTS_OUT_DIR/release/kubevirt-operator.yaml
TESTING_MANIFEST_PATH=$MANIFESTS_OUT_DIR/testing
KUBEVIRT_CRI="$(determine_cri_bin)"
Expand Down

0 comments on commit 1b1a335

Please sign in to comment.