Skip to content

Commit

Permalink
Updating github-config
Browse files Browse the repository at this point in the history
  • Loading branch information
paketo-bot committed Jul 13, 2022
1 parent b819c32 commit 81e2453
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion scripts/.util/tools.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"createpackage": "v1.60.1",
"createpackage": "v1.61.0",
"jam": "v1.4.0",
"pack": "v0.27.0"
}
56 changes: 32 additions & 24 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 81e2453

Please sign in to comment.