From 3a8560f72aaac7dde3a4b6eafbcbbc883a5f4d26 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 8 Nov 2023 13:28:40 +0000 Subject: [PATCH 1/3] Updating github-config --- .github/workflows/create-draft-release.yml | 3 +-- .github/workflows/test-pull-request.yml | 3 +-- scripts/.util/git.sh | 21 -------------------- scripts/integration.sh | 23 ++++++++++------------ 4 files changed, 12 insertions(+), 38 deletions(-) delete mode 100644 scripts/.util/git.sh diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 481e28d..8474cab 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -53,9 +53,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Run Integration Tests - run: ./scripts/integration.sh --use-token --builder ${{ matrix.builder }} + run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} env: - GIT_TOKEN: ${{ github.token }} TMPDIR: "${{ runner.temp }}" release: diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 487e1a2..6574ff7 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -55,9 +55,8 @@ jobs: uses: actions/checkout@v3 - name: Run Integration Tests - run: ./scripts/integration.sh --use-token --builder ${{ matrix.builder }} + run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} env: - GIT_TOKEN: ${{ github.token }} TMPDIR: "${{ runner.temp }}" roundup: diff --git a/scripts/.util/git.sh b/scripts/.util/git.sh deleted file mode 100644 index 71965bc..0000000 --- a/scripts/.util/git.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eu -set -o pipefail - -# shellcheck source=SCRIPTDIR/print.sh -source "$(dirname "${BASH_SOURCE[0]}")/print.sh" - -function util::git::token::fetch() { - if [[ -z "${GIT_TOKEN:-""}" ]]; then - util::print::title "Fetching GIT_TOKEN" - - GIT_TOKEN="$( - lpass show Shared-CF\ Buildpacks/concourse-private.yml \ - | grep buildpacks-github-token \ - | cut -d ' ' -f 2 - )" - fi - - printf "%s" "${GIT_TOKEN}" -} diff --git a/scripts/integration.sh b/scripts/integration.sh index 13a5635..8e98b15 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -19,15 +19,12 @@ source "${PROGDIR}/.util/git.sh" source "${PROGDIR}/.util/builders.sh" function main() { - local builderArray + local builderArray token builderArray=() + token="" + while [[ "${#}" != 0 ]]; do case "${1}" in - --use-token|-t) - shift 1 - token::fetch - ;; - --help|-h) shift 1 usage @@ -39,6 +36,11 @@ function main() { shift 2 ;; + --token|-t) + token="${2}" + shift 2 + ;; + "") # skip if the argument is empty shift 1 @@ -53,7 +55,7 @@ function main() { util::print::warn "** WARNING No Integration tests **" fi - tools::install "${GIT_TOKEN:-}" + tools::install "${token}" if [ ${#builderArray[@]} -eq 0 ]; then util::print::title "No builders provided. Finding builders in integration.json..." @@ -93,9 +95,9 @@ Runs the integration test suite. OPTIONS --help -h prints the command usage - --use-token -t use GIT_TOKEN from lastpass --builder -b sets the name of the builder(s) that are pulled / used for testing. Defaults to "builders" array in integration.json, if present. + --token Token used to download assets from GitHub (e.g. jam, pack, etc) (optional) USAGE } @@ -144,11 +146,6 @@ function builder_images::pull() { docker pull "${lifecycle_image}" } -function token::fetch() { - GIT_TOKEN="$(util::git::token::fetch)" - export GIT_TOKEN -} - function tests::run() { util::print::title "Run Buildpack Runtime Integration Tests" util::print::info "Using ${1} as builder..." From 1d05d3d3444f9a4d4e9c8b011288a2b7f3f51eba Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 9 Nov 2023 13:31:37 +0000 Subject: [PATCH 2/3] Updating github-config --- scripts/.util/tools.json | 2 +- scripts/integration.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index bce6071..46bdfc0 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.67.2", "jam": "v2.6.0", - "pack": "v0.31.0" + "pack": "v0.32.0" } diff --git a/scripts/integration.sh b/scripts/integration.sh index 8e98b15..46ffbdb 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -12,9 +12,6 @@ source "${PROGDIR}/.util/tools.sh" # shellcheck source=SCRIPTDIR/.util/print.sh source "${PROGDIR}/.util/print.sh" -# shellcheck source=SCRIPTDIR/.util/git.sh -source "${PROGDIR}/.util/git.sh" - # shellcheck source=SCRIPTDIR/.util/builders.sh source "${PROGDIR}/.util/builders.sh" From 4ab5a8c0a610de1e2d3a04877720345aba0e5c68 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 14 Nov 2023 13:29:14 +0000 Subject: [PATCH 3/3] 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 46bdfc0..7dc13f1 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.67.2", - "jam": "v2.6.0", + "jam": "v2.7.0", "pack": "v0.32.0" }