diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 8cbb347c..281809f6 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -57,6 +57,7 @@ jobs: run: ./scripts/integration.sh --use-token --builder ${{ matrix.builder }} env: GIT_TOKEN: ${{ github.token }} + TMPDIR: "${{ runner.temp }}" release: name: Release diff --git a/.github/workflows/go-get-update.yml b/.github/workflows/go-get-update.yml deleted file mode 100644 index cbf8bc09..00000000 --- a/.github/workflows/go-get-update.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Go Get Update - -on: - schedule: - - cron: '0 0 * * 1' # Once per week, Mondays at midnight - workflow_dispatch: {} - -jobs: - update: - name: Go Get Update - runs-on: ubuntu-22.04 - steps: - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: 1.20.x - - - name: Checkout - uses: actions/checkout@v3 - - - name: Checkout Branch - uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main - with: - branch: automation/tools/go-get-update - - - shell: bash - run: | - go get -u ./... - go mod tidy - - - name: Commit - id: commit - uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main - with: - message: "Running 'go get -u ./...'" - pathspec: "." - keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} - key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} - - - name: Push Branch - if: ${{ steps.commit.outputs.commit_sha != '' }} - uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main - with: - branch: automation/tools/go-get-update - - - name: Open Pull Request - if: ${{ steps.commit.outputs.commit_sha != '' }} - uses: paketo-buildpacks/github-config/actions/pull-request/open@main - with: - token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - title: "Running 'go get -u ./...'" - branch: automation/tools/go-get-update - - failure: - name: Alert on Failure - runs-on: ubuntu-22.04 - needs: [update] - if: ${{ always() && needs.update.result == 'failure' }} - steps: - - name: File Failure Alert Issue - uses: paketo-buildpacks/github-config/actions/issue/file@main - with: - token: ${{ secrets.GITHUB_TOKEN }} - repo: ${{ github.repository }} - label: "failure:go-get-update" - comment_if_exists: true - issue_title: "Failure: Go get update workflow" - issue_body: | - Go get update workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). - comment_body: | - Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 1111617e..b41bd1ea 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -60,6 +60,7 @@ jobs: run: ./scripts/integration.sh --use-token --builder ${{ matrix.builder }} env: GIT_TOKEN: ${{ github.token }} + TMPDIR: "${{ runner.temp }}" roundup: name: Integration Tests diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index aedb54d7..a8834ad7 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.66.1", - "jam": "v2.3.0", - "pack": "v0.29.0" + "createpackage": "v1.66.2", + "jam": "v2.5.0", + "pack": "v0.30.0" } 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() {