Skip to content

Commit ca9643a

Browse files
committed
pass required arch when building docker
1 parent f2666b7 commit ca9643a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

buildkite/scripts/debian/start_local_repo.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ if [ -z $MINA_DEB_CODENAME ]; then
55
exit 1
66
fi
77

8+
# Parse command line arguments
9+
ARCH="amd64" # default architecture
10+
11+
while [[ $# -gt 0 ]]; do
12+
case $1 in
13+
--arch)
14+
ARCH="$2"
15+
shift 2
16+
;;
17+
*)
18+
echo "Unknown option: $1"
19+
exit 1
20+
;;
21+
esac
22+
done
23+
824
LOCAL_DEB_FOLDER=_build
925

1026
set -eou pipefail
@@ -16,4 +32,4 @@ mkdir -p $LOCAL_DEB_FOLDER
1632
source ./buildkite/scripts/export-git-env-vars.sh
1733
./buildkite/scripts/cache/manager.sh read --root legacy/debians "$MINA_DEB_CODENAME/*" _build
1834
./buildkite/scripts/cache/manager.sh read "debians/$MINA_DEB_CODENAME/*" _build
19-
./scripts/debian/aptly.sh start --codename $MINA_DEB_CODENAME --debians $LOCAL_DEB_FOLDER --component unstable --clean --background --wait
35+
./scripts/debian/aptly.sh start --codename $MINA_DEB_CODENAME --debians $LOCAL_DEB_FOLDER --component unstable --clean --background --wait --archs $ARCH

buildkite/src/Command/DockerImage.dhall

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ let generateStep =
109109
then " && echo Skipping local debian repo setup "
110110

111111
else " && ./buildkite/scripts/debian/update.sh --verbose"
112-
++ " && apt-get install aptly -y && ./buildkite/scripts/debian/start_local_repo.sh"
112+
++ " && apt-get install aptly -y && ./buildkite/scripts/debian/start_local_repo.sh --arch ${Arch.lowerName
113+
spec.arch}"
113114

114115
let maybeStopDebianRepo =
115116
if spec.no_debian

0 commit comments

Comments
 (0)