Skip to content

Commit

Permalink
Make build ARCH-aware
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Neergaard <[email protected]>
(cherry picked from commit 58d04e2)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
neersighted authored and thaJeztah committed Jul 23, 2024
1 parent dbc329c commit 0e46810
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def generatePackageStep(opts, arch) {
'''
checkout scm
sh 'make clean'
sh "make CREATE_ARCHIVE=1 ${opts.image}"
sh "make CREATE_ARCHIVE=1 ARCH=${arch} ${opts.image}"
archiveArtifacts(artifacts: 'archive/*.tar.gz', onlyIfSuccessful: true)
} finally {
deleteDir()
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

include common/common.mk

ARCH=$(shell uname -m)
BUILD_IMAGE=ubuntu:focal
BUILD_TYPE=$(shell ./scripts/deb-or-rpm $(BUILD_IMAGE))
BUILD_BASE=$(shell ./scripts/determine-base $(BUILD_IMAGE))
Expand Down Expand Up @@ -84,7 +85,7 @@ build:
@echo ""
@echo "containerd : $(REF) (commit: $(shell git -C "src/github.com/containerd/containerd" log -1 --pretty='%h'))"
@echo "runc : $$(./scripts/determine-runc-version) (commit: $$(git -C "src/github.com/opencontainers/runc" log -1 --pretty='%h'))"
@echo "architecture : $(shell uname -m)"
@echo "architecture : $(ARCH)"
@echo "build image : $(BUILD_IMAGE)"
@echo "golang image : $(GOLANG_IMAGE)"
@echo "--------------------------------------------------------------------"
Expand All @@ -96,6 +97,7 @@ build:

@set -x; DOCKER_BUILDKIT=1 docker build \
--pull \
--platform linux/$(ARCH) \
--build-arg GOLANG_IMAGE="$(GOLANG_IMAGE)" \
--build-arg BUILD_IMAGE="$(BUILD_IMAGE)" \
--build-arg BASE="$(BUILD_BASE)" \
Expand Down

0 comments on commit 0e46810

Please sign in to comment.