Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates github-config #592

Merged
merged 10 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v3
- name: Run Unit Tests
Expand All @@ -49,14 +49,12 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v3
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
- 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 All @@ -67,10 +65,11 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v3
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
with:
fetch-tags: true
- name: Reset Draft Release
id: reset
uses: paketo-buildpacks/github-config/actions/release/reset-draft@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -49,17 +49,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3

- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true

- 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
2 changes: 1 addition & 1 deletion .github/workflows/update-dependencies-from-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
on:
workflow_dispatch:
schedule:
- cron: '57 13 * * *' # daily at 13:57 UTC

Check warning on line 6 in .github/workflows/update-dependencies-from-metadata.yml

View workflow job for this annotation

GitHub Actions / lintYaml

6:27 [comments] too few spaces before comment

jobs:
retrieve:
Expand All @@ -25,7 +25,7 @@
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
go-version: 'stable'

- name: Run Retrieve
id: retrieve
Expand Down
21 changes: 0 additions & 21 deletions scripts/.util/git.sh

This file was deleted.

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.67.2",
"jam": "v2.6.0",
"pack": "v0.31.0"
"pack": "v0.32.0"
}
26 changes: 10 additions & 16 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@ 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"

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 +33,11 @@ function main() {
shift 2
;;

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

"")
# skip if the argument is empty
shift 1
Expand All @@ -53,7 +52,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 +92,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 +143,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
Loading