Skip to content

Commit bcf4237

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

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

hack/common.sh

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ 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+
docker buildx ls
19+
20+
echo "Building image for arm64"
21+
docker buildx build \
22+
--debug \
23+
--pull \
24+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-arm64" \
25+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
26+
--platform "linux/arm64" \
27+
"${REPO_ROOT_DIR}/transform-jsonata" \
28+
|| return $?
29+
30+
echo "Building image for amd64"
31+
docker buildx build \
32+
--debug \
33+
--pull \
34+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-amd64" \
35+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
36+
--platform "linux/amd64" \
37+
"${REPO_ROOT_DIR}/transform-jsonata" \
38+
|| return $?
3239
}
3340

3441
function push_transform_jsonata_image() {
@@ -53,11 +60,3 @@ function push_transform_jsonata_image() {
5360
function build_integration_images() {
5461
"${REPO_ROOT_DIR}/mvnw" clean package -P knative -DskipTests || return $?
5562
}
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)