From 5e68e102441f2b50d65538ed7baab25369cebd04 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 30 Aug 2023 02:07:36 +0000 Subject: [PATCH] Updating github-config --- scripts/integration.sh | 52 +++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/scripts/integration.sh b/scripts/integration.sh index 1eb8d1c9..13a5635f 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -61,17 +61,20 @@ function main() { local builders builders="$(util::builders::list "${BUILDPACKDIR}/integration.json" | jq -r '.[]' )" + util::print::info "Found the following builders:" + util::print::info "${builders}" + # shellcheck disable=SC2206 IFS=$'\n' builderArray=(${builders}) unset IFS fi - # shellcheck disable=SC2068 - images::pull ${builderArray[@]} - local testout testout=$(mktemp) for builder in "${builderArray[@]}"; do + util::print::title "Getting images for builder: '${builder}'" + builder_images::pull "${builder}" + util::print::title "Setting default pack builder image..." pack config default-builder "${builder}" @@ -117,27 +120,28 @@ function tools::install() { fi } -function images::pull() { - for builder in "${@}"; 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 +function builder_images::pull() { + local builder + builder="${1}" + + 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}" } function token::fetch() {