Skip to content

Commit

Permalink
rpm,deb: make build ARCH-aware
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Neergaard <[email protected]>
  • Loading branch information
neersighted committed Mar 15, 2024
1 parent 635fcfa commit 95f4e2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def genBuildStep(LinkedHashMap pkg, String arch) {
stage("build") {
checkout scm
sh "make clean"
sh "make REF=$branch ${pkg.target}"
sh "make REF=$branch ARCH=${arch} ${pkg.target}"
}
stage("verify") {
sh "make IMAGE=${pkg.image} verify"
sh "make IMAGE=${pkg.image} ARCH=${arch} verify"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ BUILD?=DOCKER_BUILDKIT=1 \
--build-arg GO_IMAGE=$(GO_IMAGE) \
--build-arg COMMON_FILES=$(COMMON_FILES) \
-t debbuild-$@/$(ARCH) \
--platform linux/$(ARCH) \
-f $@/Dockerfile \
.

# Additional flags may be necessary at some point
RUN_FLAGS=
RUN?=docker run --rm \
--platform linux/$(ARCH) \
-e PLATFORM \
-e EPOCH='$(EPOCH)' \
-e DEB_VERSION=$(word 1, $(GEN_DEB_VER)) \
Expand Down
2 changes: 2 additions & 0 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BUILD?=DOCKER_BUILDKIT=1 \
$(BUILD_IMAGE_FLAG) \
--build-arg GO_IMAGE=$(GO_IMAGE) \
-t rpmbuild-$@/$(ARCH) \
--platform linux/$(ARCH) \
-f $@/Dockerfile \
.

Expand All @@ -42,6 +43,7 @@ RPMBUILD_FLAGS?=-ba\
# Additional flags may be necessary at some point
RUN_FLAGS=
RUN?=docker run --rm \
--platform linux/$(ARCH) \
-e PLATFORM \
-v $(CURDIR)/rpmbuild/SOURCES:/root/rpmbuild/SOURCES:ro \
-v $(CURDIR)/rpmbuild/$@/RPMS:/root/rpmbuild/RPMS \
Expand Down

0 comments on commit 95f4e2e

Please sign in to comment.