Skip to content

Commit

Permalink
Merge pull request #129 from ashokpariya0/fix-release-build
Browse files Browse the repository at this point in the history
Construct the image name directly within the build target
  • Loading branch information
kubevirt-bot authored Dec 16, 2024
2 parents bb2eac9 + c3951cd commit 4fbcfed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ PLATFORMS := $(if $(filter all,$(PLATFORMS)),$(PLATFORM_LIST),$(PLATFORMS))
# export PLATFORMS=linux/arm64,linux/s390x,linux/amd64
# or export PLATFORMS=all to automatically include all supported platforms.
DOCKER_BUILDER ?= macvtap-docker-builder
MACVTAP_IMAGE_TAGGED := ${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}

# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
Expand Down Expand Up @@ -82,20 +81,20 @@ vet: $(go_sources) $(GO)

docker-build:
ifeq ($(OCI_BIN),podman)
$(MAKE) build-multiarch-macvtap-podman
$(MAKE) build-multiarch-macvtap-podman MACVTAP_IMAGE_TAGGED=$(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)
else ifeq ($(OCI_BIN),docker)
$(MAKE) build-multiarch-macvtap-docker
$(MAKE) build-multiarch-macvtap-docker MACVTAP_IMAGE_TAGGED=$(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)
else
$(error Unsupported OCI_BIN value: $(OCI_BIN))
endif

docker-push:
ifeq ($(OCI_BIN),podman)
podman manifest push --tls-verify=false ${MACVTAP_IMAGE_TAGGED} ${MACVTAP_IMAGE_TAGGED}
podman manifest push --tls-verify=false $(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) $(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)
endif

docker-tag-latest:
$(OCI_BIN) tag ${IMAGE_REGISTRY}/${IMAGE_NAME}:latest ${MACVTAP_IMAGE_TAGGED}
$(OCI_BIN) tag ${IMAGE_REGISTRY}/${IMAGE_NAME}:latest $(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)

cluster-up:
./cluster/up.sh
Expand Down
1 change: 1 addition & 0 deletions automation/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ git config credential.helper '!f() { sleep 1; echo "username=${GITHUB_USER}"; ec

source automation/check-patch.setup.sh
cd ${TMP_PROJECT_PATH}
export PLATFORMS=all
make release
1 change: 1 addition & 0 deletions hack/build-macvtap-podman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ podman manifest rm "${MACVTAP_IMAGE_TAGGED}" 2>/dev/null || true
podman manifest rm "${MARKER_IMAGE_GIT_TAGGED}" 2>/dev/null || true
podman rmi "${MACVTAP_IMAGE_TAGGED}" 2>/dev/null || true
podman rmi "${MARKER_IMAGE_GIT_TAGGED}" 2>/dev/null || true
podman rmi $(podman images --filter "dangling=true" -q) 2>/dev/null || true

podman manifest create "${MACVTAP_IMAGE_TAGGED}"

Expand Down
3 changes: 2 additions & 1 deletion hack/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

destination=$1
version=$(grep "^go " go.mod | awk '{print $2}')
tarball=go$version.linux-amd64.tar.gz
arch=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
tarball=go$version.linux-$arch.tar.gz
url=https://dl.google.com/go/

mkdir -p $destination
Expand Down

0 comments on commit 4fbcfed

Please sign in to comment.