Skip to content

Commit 64197ed

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

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

hack/common.sh

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ 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 builx build \
18+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-arm64" \
19+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
20+
--platform "linux/arm64" \
21+
"${REPO_ROOT_DIR}/transform-jsonata" \
22+
|| return $?
23+
24+
docker builx build \
25+
-t "${TRANSFORM_JSONATA_IMAGE_WITH_TAG}-amd64" \
26+
-f "${REPO_ROOT_DIR}/transform-jsonata/Dockerfile" \
27+
--platform "linux/amd64" \
28+
"${REPO_ROOT_DIR}/transform-jsonata" \
29+
|| return $?
3230
}
3331

3432
function push_transform_jsonata_image() {
@@ -53,11 +51,3 @@ function push_transform_jsonata_image() {
5351
function build_integration_images() {
5452
"${REPO_ROOT_DIR}/mvnw" clean package -P knative -DskipTests || return $?
5553
}
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)