ci: pass down `$SYSTEM` for relup base versions escript
`relup-base-versions.escript` needs to know the system the package is being built for to correctly enumerate the base versions for relup.
This commit is contained in:
parent
4fd62a7ace
commit
f40fcdd036
|
@ -259,6 +259,7 @@ jobs:
|
||||||
--profile "${PROFILE}" \
|
--profile "${PROFILE}" \
|
||||||
--pkgtype "${PACKAGE}" \
|
--pkgtype "${PACKAGE}" \
|
||||||
--arch "${ARCH}" \
|
--arch "${ARCH}" \
|
||||||
|
--system "${SYSTEM}" \
|
||||||
--builder "ghcr.io/emqx/emqx-builder/4.4-19:${OTP}-${SYSTEM}"
|
--builder "ghcr.io/emqx/emqx-builder/4.4-19:${OTP}-${SYSTEM}"
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -20,6 +20,7 @@ help() {
|
||||||
echo "--arch amd64|arm64: Target arch to build the EMQ X package for"
|
echo "--arch amd64|arm64: Target arch to build the EMQ X package for"
|
||||||
echo "--src_dir <SRC_DIR>: EMQ X source ode in this dir, default to PWD"
|
echo "--src_dir <SRC_DIR>: EMQ X source ode in this dir, default to PWD"
|
||||||
echo "--builder <BUILDER>: Builder image to pull"
|
echo "--builder <BUILDER>: Builder image to pull"
|
||||||
|
echo "--system <SYSTEM>: The target OS system the package is being built for, ex: debian11"
|
||||||
echo " E.g. ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-debian10"
|
echo " E.g. ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-debian10"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +50,10 @@ while [ "$#" -gt 0 ]; do
|
||||||
ARCH="$2"
|
ARCH="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--system)
|
||||||
|
SYSTEM="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WARN: Unknown arg (ignored): $1"
|
echo "WARN: Unknown arg (ignored): $1"
|
||||||
shift
|
shift
|
||||||
|
@ -70,6 +75,8 @@ fi
|
||||||
cd "${SRC_DIR:-.}"
|
cd "${SRC_DIR:-.}"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
# $SYSTEM below is used by the `relup-base-vsns.escript` to correctly
|
||||||
|
# output the list of relup base versions.
|
||||||
docker info
|
docker info
|
||||||
docker run --rm --privileged tonistiigi/binfmt:latest --install "${ARCH}"
|
docker run --rm --privileged tonistiigi/binfmt:latest --install "${ARCH}"
|
||||||
docker run -i --rm \
|
docker run -i --rm \
|
||||||
|
@ -77,5 +84,6 @@ docker run -i --rm \
|
||||||
--workdir /emqx \
|
--workdir /emqx \
|
||||||
--platform="linux/$ARCH" \
|
--platform="linux/$ARCH" \
|
||||||
--user root \
|
--user root \
|
||||||
|
-e SYSTEM="$SYSTEM" \
|
||||||
"$BUILDER" \
|
"$BUILDER" \
|
||||||
bash -euc "git config --global --add safe.directory /emqx && chown -R root:root _build && make ${PROFILE}-${PKGTYPE} && .ci/build_packages/tests.sh $PROFILE $PKGTYPE"
|
bash -euc "git config --global --add safe.directory /emqx && chown -R root:root _build && make ${PROFILE}-${PKGTYPE} && .ci/build_packages/tests.sh $PROFILE $PKGTYPE"
|
||||||
|
|
Loading…
Reference in New Issue