File tree Expand file tree Collapse file tree 4 files changed +25
-8
lines changed
Expand file tree Collapse file tree 4 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 22
33source " $( dirname $0 ) /common.sh"
44
5+ export KO_DOCKER_REPO=" ${KO_DOCKER_REPO:- kind.local} "
6+
57build_transform_jsonata_image || exit 1
8+
9+ build_integration_images || exit 1
Original file line number Diff line number Diff line change @@ -10,14 +10,22 @@ readonly REPO_ROOT_DIR
1010function build_transform_jsonata_image() {
1111 local image=" ${KO_DOCKER_REPO} /transform-jsonata:${TAG} "
1212
13- docker buildx build \
14- --platform linux/amd64,linux/arm64 \
13+ docker build \
14+ --platform " linux/amd64" \
15+ --platform " linux/arm64" \
1516 -t " ${image} " \
1617 -f " ${REPO_ROOT_DIR} /transform-jsonata/Dockerfile" \
17- --push \
1818 " ${REPO_ROOT_DIR} /transform-jsonata" || return $?
1919
2020
2121 TRANSFORM_JSONATA_IMAGE=$( docker inspect --format ' {{index .RepoDigests 0}}' " ${image} " )
2222 export TRANSFORM_JSONATA_IMAGE
2323}
24+
25+ function push_transform_jsonata_image() {
26+ docker push " ${TRANSFORM_JSONATA_IMAGE} " || return $?
27+ }
28+
29+ function build_integration_images() {
30+ " ${REPO_ROOT_DIR} /mvnw" clean package -P knative -DskipTests || return $?
31+ }
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ function build_release() {
2727
2828 # KO_DOCKER_REPO and TAG are calculated in release.sh script
2929
30- ./mvnw clean package -P knative -DskipTests || return $?
30+ build_integration_images || return $?
3131
3232 # use the function so that the exported TRANSFORM_JSONATA_IMAGE is visible after during generate_transformation_configMap
3333 build_transform_jsonata_image || return $?
34+ push_transform_jsonata_image || return $?
3435
3536 echo " Image build & push completed"
3637
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # TODO a placeholder script to CI automation.
4- # Can be used to execute integration tests in the future.
3+ # shellcheck disable=SC1090
4+ source " $( go run knative.dev/hack/cmd/script presubmit-tests.sh) "
5+ source " $( go run knative.dev/hack/cmd/script infra-library.sh) "
56
6- ./hack/build.sh
7+ function build_tests() {
8+ header " Running build tests"
9+ ./hack/build.sh || fail_test " build tests failed"
10+ }
711
8- true
12+ main $@
You can’t perform that action at this time.
0 commit comments