Skip to content

Commit 2733a49

Browse files
committed
Back to buildx
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
1 parent f50df93 commit 2733a49

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

hack/common.sh

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@ export TRANSFORM_JSONATA_DIR="${REPO_ROOT_DIR}/transform-jsonata"
1414

1515
function build_transform_jsonata_image() {
1616

17-
download_pack_cli || return $?
18-
19-
cd "${TRANSFORM_JSONATA_DIR}" && \
20-
pack build "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-arm64" \
21-
--builder docker.io/heroku/builder:24 \
22-
--platform "linux/arm64" \
23-
--clear-cache && \
24-
cd -
25-
26-
cd "${TRANSFORM_JSONATA_DIR}" && \
27-
pack build "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-amd64" \
28-
--builder docker.io/heroku/builder:24 \
29-
--platform "linux/amd64" \
30-
--clear-cache && \
31-
cd -
17+
docker info
18+
19+
echo "Building image for arm64"
20+
docker buildx build \
21+
--debug \
22+
--pull \
23+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-arm64" \
24+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
25+
--platform "linux/arm64" \
26+
"${REPO_ROOT_DIR}/transform-jsonata" \
27+
|| return $?
28+
29+
echo "Building image for amd64"
30+
docker buildx build \
31+
--debug \
32+
--pull \
33+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-amd64" \
34+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
35+
--platform "linux/amd64" \
36+
"${REPO_ROOT_DIR}/transform-jsonata" \
37+
|| return $?
3238
}
3339

3440
function push_transform_jsonata_image() {
@@ -53,11 +59,3 @@ function push_transform_jsonata_image() {
5359
function build_integration_images() {
5460
"${REPO_ROOT_DIR}/mvnw" clean package -P knative -DskipTests || return $?
5561
}
56-
57-
function download_pack_cli() {
58-
local dir
59-
dir="$(mktemp -d)"
60-
git clone --depth 1 --branch "v0.36.4" https://github.com/buildpacks/pack.git "${dir}"
61-
cd "${dir}" && go install ./cmd/pack && cd - || return $?
62-
rm -rf "${dir}"
63-
}

0 commit comments

Comments
 (0)