From 7788fb6bdd00c2942d61bc91c017efc4df485e87 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 13 Jul 2022 03:23:39 +0000 Subject: [PATCH] Updating github-config --- scripts/.util/tools.json | 2 +- scripts/integration.sh | 56 +++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index c85e349b..3ad77611 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.60.1", + "createpackage": "v1.61.0", "jam": "v1.4.0", "pack": "v0.27.0" } diff --git a/scripts/integration.sh b/scripts/integration.sh index c3171744..d6771a40 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -77,38 +77,46 @@ function tools::install() { } function images::pull() { - local builder - builder="" + local builders + builders="" if [[ -f "${BUILDPACKDIR}/integration.json" ]]; then - builder="$(jq -r .builder "${BUILDPACKDIR}/integration.json")" + builders="$(jq -r .builder "${BUILDPACKDIR}/integration.json")" + + if [[ "${builders}" == "null" || -z "${builders}" ]]; then + builders="$(jq -r 'select(.builders != null) | .builders[]' "${BUILDPACKDIR}/integration.json")" + fi fi - if [[ "${builder}" == "null" || -z "${builder}" ]]; then - builder="index.docker.io/paketobuildpacks/builder:buildpackless-base" + if [[ "${builders}" == "null" || -z "${builders}" ]]; then + builders="index.docker.io/paketobuildpacks/builder:buildpackless-base" fi - util::print::title "Pulling builder image..." - docker pull "${builder}" + while read -r builder; do + util::print::title "Pulling builder image ${builder}..." + docker pull "${builder}" + + local run_image lifecycle_image + run_image="$( + pack inspect-builder "${builder}" --output json \ + | jq -r '.remote_info.run_images[0].name' + )" + lifecycle_image="index.docker.io/buildpacksio/lifecycle:$( + pack inspect-builder "${builder}" --output json \ + | jq -r '.remote_info.lifecycle.version' + )" + + util::print::title "Pulling run image..." + docker pull "${run_image}" + + util::print::title "Pulling lifecycle image..." + docker pull "${lifecycle_image}" + done <<< "${builders}" util::print::title "Setting default pack builder image..." - pack config default-builder "${builder}" - - local run_image lifecycle_image - run_image="$( - pack inspect-builder "${builder}" --output json \ - | jq -r '.remote_info.run_images[0].name' - )" - lifecycle_image="index.docker.io/buildpacksio/lifecycle:$( - pack inspect-builder "${builder}" --output json \ - | jq -r '.remote_info.lifecycle.version' - )" - - util::print::title "Pulling run image..." - docker pull "${run_image}" - - util::print::title "Pulling lifecycle image..." - docker pull "${lifecycle_image}" + local default + read -r default <<< "${builders}" + pack config default-builder "${default}" } function token::fetch() {