Skip to content

Commit 6e4ecd1

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

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

hack/common.sh

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

3436
function push_transform_jsonata_image() {
@@ -53,11 +55,3 @@ function push_transform_jsonata_image() {
5355
function build_integration_images() {
5456
"${REPO_ROOT_DIR}/mvnw" clean package -P knative -DskipTests || return $?
5557
}
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)