You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2022/02/10 14:05:13 UTC
[couchdb-pkg] 02/02: Use --platform to select container arch at runtime
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git
commit 7f1e10a3302e5ee9b292ea5ded8ad89b8b768bf8
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Mon Feb 7 09:32:49 2022 -0500
Use --platform to select container arch at runtime
The bugs seem to have been worked out here, so we can use multi-platform
container images like the ones we've generated for CI and still select
the runtime architecture we want if we need to build packages via QEMU.
---
Makefile | 1 +
build.sh | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 36bda2f..34d849c 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,7 @@ debian-bullseye: SPIDERMONKEY_DEV=libmozjs-78-dev
debian-bullseye: SM_VER=78
debian-bullseye: bullseye
+arm64-debian-bullseye: aarch64-debian-bullseye
arm64v8-debian-bullseye: aarch64-debian-bullseye
aarch64-debian-bullseye: PLATFORM=bullseye
aarch64-debian-bullseye: DIST=debian-bullseye
diff --git a/build.sh b/build.sh
index ac6cd37..1a4aaf4 100755
--- a/build.sh
+++ b/build.sh
@@ -32,7 +32,7 @@ DEBIANS="debian-stretch debian-buster debian-bullseye"
UBUNTUS="ubuntu-bionic ubuntu-focal"
CENTOSES="centos-7 centos-8"
XPLAT_BASE="debian-bullseye"
-XPLAT_ARCHES="arm64v8 ppc64le"
+XPLAT_ARCHES="arm64 ppc64le"
BINARY_API="https://apache.jfrog.io/artifactory"
ERLANGVERSION=${ERLANGVERSION:-23.3.4.10}
@@ -88,12 +88,14 @@ build-couch() {
docker run \
--mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
-u 0 -w /home/jenkins/couchdb-pkg \
+ --platform linux/amd64 \
apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
make copy-couch $1 COUCHTARBALL=${COUCHTARBALL}
else
docker run \
--mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
-u 0 -w /home/jenkins/couchdb-pkg \
+ --platform linux/${CONTAINERARCH} \
apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
make copy-couch ${CONTAINERARCH}-$1 COUCHTARBALL=${COUCHTARBALL}
fi