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 Nov 8, 2023
1 parent eba90e9 commit 3a8560f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 38 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 0 additions & 21 deletions scripts/.util/git.sh

This file was deleted.

23 changes: 10 additions & 13 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +36,11 @@ function main() {
shift 2
;;

--token|-t)
token="${2}"
shift 2
;;

"")
# skip if the argument is empty
shift 1
Expand All @@ -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..."
Expand Down Expand Up @@ -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 <name> -b <name> sets the name of the builder(s) that are pulled / used for testing.
Defaults to "builders" array in integration.json, if present.
--token <token> Token used to download assets from GitHub (e.g. jam, pack, etc) (optional)
USAGE
}

Expand Down Expand Up @@ -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..."
Expand Down

0 comments on commit 3a8560f

Please sign in to comment.