From 5e037552dd942d990cdcb0d5e26324b98dea490b Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 2 Jul 2024 13:33:27 +0000 Subject: [PATCH 01/15] Updating github-config --- .github/workflows/create-draft-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 8474cab..acc723e 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -66,16 +66,19 @@ jobs: uses: actions/setup-go@v3 with: go-version: 'stable' + - name: Checkout uses: actions/checkout@v3 with: fetch-tags: true + - name: Reset Draft Release id: reset uses: paketo-buildpacks/github-config/actions/release/reset-draft@main with: repo: ${{ github.repository }} token: ${{ github.token }} + - name: Calculate Semver Tag if: github.event.inputs.version == '' id: semver @@ -84,6 +87,7 @@ jobs: repo: ${{ github.repository }} token: ${{ github.token }} ref-name: ${{ github.ref_name }} + - name: Set Release Tag id: tag run: | @@ -92,14 +96,28 @@ jobs: tag="${{ steps.semver.outputs.tag }}" fi echo "tag=${tag}" >> "$GITHUB_OUTPUT" + - name: Package run: ./scripts/package.sh --version "${{ steps.tag.outputs.tag }}" + + - name: Get buildpack type + id: get_buildpack_type + run: | + + if [ -f "extension.toml" ]; then + echo "buildpack_type=extension" >> "$GITHUB_OUTPUT" + else + echo "buildpack_type=buildpack" >> "$GITHUB_OUTPUT" + fi + - name: Create Release Notes id: create-release-notes uses: paketo-buildpacks/github-config/actions/release/notes@main with: repo: ${{ github.repository }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + buildpack_type: ${{ steps.get_buildpack_type.outputs.buildpack_type }} + - name: Create Release uses: paketo-buildpacks/github-config/actions/release/create@main with: From 04ddf02fbfd5b6d93445521be1a6985dac65dc8c Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 3 Jul 2024 13:34:57 +0000 Subject: [PATCH 02/15] Updating github-config --- .github/workflows/push-buildpackage.yml | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index f96478e..4d24bb2 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -4,6 +4,8 @@ on: release: types: - published +env: + REGISTRIES_FILENAME: "registries.json" jobs: push: @@ -11,6 +13,9 @@ jobs: runs-on: ubuntu-22.04 steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Parse Event id: event run: | @@ -30,6 +35,26 @@ jobs: output: "/github/workspace/buildpackage.cnb" token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + - name: Parse Configs + id: parse_configs + run: | + registries_filename="${{ env.REGISTRIES_FILENAME }}" + + push_to_dockerhub=true + push_to_gcr=true + + if [[ -f $registries_filename ]]; then + if jq 'has("dockerhub")' $registries_filename > /dev/null; then + push_to_dockerhub=$(jq '.dockerhub' $registries_filename) + fi + if jq 'has("GCR")' $registries_filename > /dev/null; then + push_to_gcr=$(jq '.GCR' $registries_filename) + fi + fi + + echo "push_to_dockerhub=${push_to_dockerhub}" >> "$GITHUB_OUTPUT" + echo "push_to_gcr=${push_to_gcr}" >> "$GITHUB_OUTPUT" + - name: Validate version run: | buidpackTomlVersion=$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" | jq -r '.Labels."io.buildpacks.buildpackage.metadata" | fromjson | .version') @@ -40,6 +65,7 @@ jobs: fi - name: Push to GCR + if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} env: GCR_PUSH_BOT_JSON_KEY: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }} run: | @@ -50,7 +76,7 @@ jobs: sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:latest" - name: Push to DockerHub - id: push + if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} env: DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} From 582ae5f1d6842bc31f4a786d016bc177483d63ce Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 11 Jul 2024 13:36:05 +0000 Subject: [PATCH 03/15] Updating github-config --- .github/workflows/push-buildpackage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 4d24bb2..390ce27 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -77,6 +77,7 @@ jobs: - name: Push to DockerHub if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} + id: push env: DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} From 469f986f79314c2fe1a223f55e4790a5cbb8a93e Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 12 Jul 2024 13:33:26 +0000 Subject: [PATCH 04/15] Updating github-config --- .github/workflows/update-go-mod-version.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml index 2cc949c..b68db8a 100644 --- a/.github/workflows/update-go-mod-version.yml +++ b/.github/workflows/update-go-mod-version.yml @@ -27,7 +27,7 @@ jobs: id: current-go-version uses: paketo-buildpacks/github-config/actions/update-go-mod-version@main with: - toolchain-version: ${{ steps.setup-go.outputs.go-version }} + go-version: ${{ steps.setup-go.outputs.go-version }} - name: Go mod tidy run: | #!/usr/bin/env bash @@ -54,7 +54,7 @@ jobs: id: commit uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main with: - message: "Updates go mod toolchain version to ${{ steps.setup-go.outputs.go-version }}" + message: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" pathspec: "." keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} @@ -70,7 +70,7 @@ jobs: uses: paketo-buildpacks/github-config/actions/pull-request/open@main with: token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - title: "Updates go mod toolchain version to ${{ steps.setup-go.outputs.go-version }}" + title: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" branch: automation/go-mod-update/update-main failure: From f865b4a9bfbcdcc06cdc84d34e00e5b67f020a2d Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 4 Sep 2024 13:39:07 +0000 Subject: [PATCH 05/15] Updating github-config --- .github/workflows/test-pull-request.yml | 2 ++ scripts/unit.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 6574ff7..f1b3dc0 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -26,6 +26,8 @@ jobs: uses: actions/checkout@v3 - name: Run Unit Tests + env: + GO_TEST_PARAMS: -count=5 run: ./scripts/unit.sh - name: Get builders from integration.json diff --git a/scripts/unit.sh b/scripts/unit.sh index 8e193c7..dd130bf 100755 --- a/scripts/unit.sh +++ b/scripts/unit.sh @@ -6,6 +6,8 @@ set -o pipefail readonly PROGDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)" +GO_TEST_PARAMS="${GO_TEST_PARAMS:-}" + # shellcheck source=SCRIPTDIR/.util/tools.sh source "${PROGDIR}/.util/tools.sh" @@ -50,7 +52,7 @@ function unit::run() { testout=$(mktemp) pushd "${BUILDPACKDIR}" > /dev/null - if go test ./... -v -run Unit | tee "${testout}"; then + if go test ./... -v ${GO_TEST_PARAMS} -run Unit | tee "${testout}"; then util::tools::tests::checkfocus "${testout}" util::print::success "** GO Test Succeeded **" else From 4228f8172fc337a450742c6e86521859f448b2a4 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 10 Sep 2024 13:38:33 +0000 Subject: [PATCH 06/15] Updating github-config --- scripts/.util/tools.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index e2e977d..6a5dbdb 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.70.0", - "jam": "v2.8.0", - "pack": "v0.34.2" + "createpackage": "v1.71.0", + "jam": "v2.9.0", + "pack": "v0.35.1" } From 59a1a445ae1ec6ab727a064605ce4dc31b4d4e4f Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 11 Oct 2024 13:40:56 +0000 Subject: [PATCH 07/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 6a5dbdb..4a31bfd 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.71.0", + "createpackage": "v1.72.0", "jam": "v2.9.0", "pack": "v0.35.1" } From f258612823cf6e2c519b6aa72546a8b30856f451 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 18 Oct 2024 13:41:54 +0000 Subject: [PATCH 08/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 4a31bfd..cb1e440 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", - "jam": "v2.9.0", + "jam": "v2.10.0", "pack": "v0.35.1" } From e6808ab2569e39ebcdc8c4c0ab6c08d2782570bf Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 23 Nov 2024 13:40:51 +0000 Subject: [PATCH 09/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index cb1e440..5fb8661 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", - "jam": "v2.10.0", + "jam": "v2.10.1", "pack": "v0.35.1" } From 87f70557306b1865589ac827e411a6c8882174d1 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 28 Nov 2024 13:46:26 +0000 Subject: [PATCH 10/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 5fb8661..fd5add7 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", "jam": "v2.10.1", - "pack": "v0.35.1" + "pack": "v0.36.0" } From 6599144d4534d21d7fb53a886dd59381a6fb4903 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 7 Dec 2024 13:39:01 +0000 Subject: [PATCH 11/15] Updating github-config --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index f1b3dc0..cd25980 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: event-payload path: ${{ github.event_path }} From 31c727ff03119c674f183b166c27668016308792 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 13 Dec 2024 13:42:51 +0000 Subject: [PATCH 12/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index fd5add7..046c8c9 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.72.0", + "createpackage": "v1.72.1", "jam": "v2.10.1", "pack": "v0.36.0" } From bd00aed01268c88b8b140399fcdf9129dab7d8bd Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 18 Dec 2024 13:41:54 +0000 Subject: [PATCH 13/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 046c8c9..5fd7d99 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", "jam": "v2.10.1", - "pack": "v0.36.0" + "pack": "v0.36.1" } From c11b2d63dadfcd6a0be33877a4105e2210925c99 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 28 Dec 2024 13:35:38 +0000 Subject: [PATCH 14/15] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 5fd7d99..afaf456 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", "jam": "v2.10.1", - "pack": "v0.36.1" + "pack": "v0.36.2" } From e3a6624efd28b3bcb6d381a44a831e5e08a00a5e Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 7 Jan 2025 15:08:19 +0000 Subject: [PATCH 15/15] Updating github-config --- scripts/.util/tools.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/.util/tools.sh b/scripts/.util/tools.sh index 801e6ac..8feecf3 100644 --- a/scripts/.util/tools.sh +++ b/scripts/.util/tools.sh @@ -142,12 +142,10 @@ function util::tools::pack::install() { pack_config_enable_experimental="false" fi - tmp_location="/tmp/pack.tgz" curl_args=( "--fail" "--silent" "--location" - "--output" "${tmp_location}" ) if [[ "${token}" != "" ]]; then @@ -160,16 +158,14 @@ function util::tools::pack::install() { arch=$(util::tools::arch --blank-amd64) curl "https://github.com/buildpacks/pack/releases/download/${version}/pack-${version}-${os}${arch:+-$arch}.tgz" \ - "${curl_args[@]}" - - tar xzf "${tmp_location}" -C "${dir}" + "${curl_args[@]}" | \ + tar xzf - -C "${dir}" chmod +x "${dir}/pack" if [[ "${pack_config_enable_experimental}" == "true" ]]; then "${dir}"/pack config experimental true fi - rm "${tmp_location}" else util::print::info "Using pack $("${dir}"/pack version)" fi