Skip to content
Open
Show file tree
Hide file tree
Changes from 8 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
6 changes: 3 additions & 3 deletions .github/workflows/approve-bot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
download:
name: Download PR Artifact
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
pr-author: ${{ steps.pr-data.outputs.author }}
pr-number: ${{ steps.pr-data.outputs.number }}
Expand All @@ -32,7 +32,7 @@ jobs:
name: Approve Bot PRs
needs: download
if: ${{ needs.download.outputs.pr-author == 'paketo-bot' || needs.download.outputs.pr-author == 'dependabot[bot]' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check Commit Verification
id: unverified-commits
Expand All @@ -52,7 +52,7 @@ jobs:

- name: Checkout
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Approve
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

strategy:
fail-fast: false
Expand All @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency: release
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
builders: ${{ steps.builders.outputs.builders }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
with:
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run Unit Tests
run: ./scripts/unit.sh
- name: Get builders from integration.json
Expand All @@ -39,7 +39,7 @@ jobs:

integration:
name: Integration Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: unit
strategy:
matrix:
Expand All @@ -51,15 +51,15 @@ jobs:
with:
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run Integration Tests
run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }}
env:
TMPDIR: "${{ runner.temp }}"

release:
name: Release
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: integration
steps:
- name: Setup Go
Expand All @@ -68,7 +68,7 @@ jobs:
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-tags: true

Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [ unit, integration, release ]
if: ${{ always() && needs.unit.result == 'failure' || needs.integration.result == 'failure' || needs.release.result == 'failure' }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency: pr_labels_${{ github.event.number }}
jobs:
autolabel:
name: Ensure Minimal Semver Labels
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Check Minimal Semver Labels
uses: mheap/github-action-required-labels@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:

jobs:
lintYaml:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout github-config
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: paketo-buildpacks/github-config
path: github-config
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:
jobs:
golangci:
name: lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Publish Draft Release With Highest Semantic Version
id: drafts
Expand All @@ -23,7 +23,7 @@ jobs:

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [ publish ]
if: ${{ always() && needs.publish.result == 'failure' }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-buildpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
push:
name: Push
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- name: Checkout
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [push]
if: ${{ always() && needs.push.result == 'failure' }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/synchronize-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
synchronize:
name: Synchronize Labels
runs-on:
- ubuntu-22.04
- ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ github.token }}
12 changes: 6 additions & 6 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
builders: ${{ steps.builders.outputs.builders }}
steps:
Expand All @@ -23,7 +23,7 @@ jobs:
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Unit Tests
env:
Expand All @@ -41,7 +41,7 @@ jobs:

integration:
name: Integration Tests with Builders
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: unit
strategy:
matrix:
Expand All @@ -54,7 +54,7 @@ jobs:
go-version: 'stable'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Integration Tests
run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }}
Expand All @@ -64,7 +64,7 @@ jobs:
roundup:
name: Integration Tests
if: ${{ always() }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: integration
steps:
- run: |
Expand All @@ -79,7 +79,7 @@ jobs:

upload:
name: Upload Workflow Event Payload
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-github-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ concurrency: github_config_update
jobs:
build:
name: Create PR to update shared files
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}

- name: Checkout github-config
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: paketo-buildpacks/github-config
path: github-config
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [build]
if: ${{ always() && needs.build.result == 'failure' }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-go-mod-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [update-go]
if: ${{ always() && needs.update-go.result == 'failure' }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion scripts/.util/tools.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"createpackage": "v1.73.0",
"jam": "v2.11.5",
"pack": "v0.37.0"
"libpaktools": "v0.2.0",
"pack": "v0.38.2"
}
60 changes: 60 additions & 0 deletions scripts/.util/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function util::tools::arch() {
amd64|x86_64)
if [[ "${1:-}" == "--blank-amd64" ]]; then
echo ""
elif [[ "${1:-}" == "--format-amd64-x86_64" ]]; then
echo "x86_64"
else
echo "amd64"
fi
Expand Down Expand Up @@ -196,6 +198,64 @@ function util::tools::packager::install () {
fi
}

function util::tools::libpak-tools::install () {
local dir token
token=""

while [[ "${#}" != 0 ]]; do
case "${1}" in
--directory)
dir="${2}"
shift 2
;;

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

*)
util::print::error "unknown argument \"${1}\""
esac
done

mkdir -p "${dir}"
util::tools::path::export "${dir}"


if [[ ! -f "${dir}/libpak-tools" ]]; then
local version curl_args os arch

version="$(jq -r .libpaktools "$(dirname "${BASH_SOURCE[0]}")/tools.json")"

curl_args=(
"--fail"
"--silent"
"--location"
"--output" "${dir}/libpak-tools.tar.gz"
)

if [[ "${token}" != "" ]]; then
curl_args+=("--header" "Authorization: Token ${token}")
fi

util::print::title "Installing libpak-tools ${version}"

os=$(util::tools::os)
arch=$(util::tools::arch --format-amd64-x86_64)

curl "https://github.com/paketo-buildpacks/libpak-tools/releases/download/${version}/libpak-tools_${os^}_${arch}.tar.gz" \
"${curl_args[@]}"

tar -xzf "${dir}/libpak-tools.tar.gz" -C $dir
rm "${dir}/libpak-tools.tar.gz"

chmod +x "${dir}/libpak-tools"
else
util::print::info "Using libpak-tools"
fi
}

function util::tools::create-package::install () {
local dir version
while [[ "${#}" != 0 ]]; do
Expand Down
3 changes: 3 additions & 0 deletions scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ function tools::install() {
--directory "${BUILDPACKDIR}/.bin" \
--token "${token}"

util::tools::libpak-tools::install \
--directory "${BUILDPACKDIR}/.bin"

util::tools::create-package::install \
--directory "${BUILDPACKDIR}/.bin"

Expand Down
Loading