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

[Stacked] Print getting started guides in CI #761

Merged
merged 7 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,71 @@ jobs:
working-directory: ${{ matrix.buildpack-directory }}
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test --locked -- --ignored --test-threads 16

print-pack-getting-started-output:
runs-on: ${{ matrix.target == 'aarch64-unknown-linux-musl' && 'pub-hk-ubuntu-24.04-arm-medium' || 'ubuntu-24.04' }}
strategy:
matrix:
target: ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl"]
guide: ["heroku/java-getting-started", "heroku/gradle-getting-started", "heroku/scala-getting-started"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install musl-tools
run: sudo apt-get install -y --no-install-recommends musl-tools
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install Pack CLI
uses: buildpacks/github-actions/[email protected]
- name: Pull builder and run images
run: |
docker pull "heroku/builder:24"
docker pull "heroku/heroku:24"
- name: Clone getting started guide
uses: actions/checkout@v4
with:
repository: ${{ matrix.guide }}
path: tmp/guide
- name: Install libcnb-cargo for `cargo libcnb package` command
run: cargo install libcnb-cargo
- name: Compile buildpack
run: cargo libcnb package --target ${{ matrix.target }}
- name: "PRINT: Getting started guide output"
run: |
set -euo pipefail

PACK_CMD="pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --path tmp/guide --pull-policy never "
case "${{ matrix.guide }}" in
"heroku/java-getting-started")
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm "
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_java "
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_maven "
;;
"heroku/gradle-getting-started")
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm "
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_gradle "
;;
"heroku/scala-getting-started")
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_jvm "
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_sbt "
PACK_CMD+=" --buildpack packaged/${{ matrix.target }}/debug/heroku_scala "
;;
*)
echo "Unknown guide: ${{ matrix.guide }}"
exit 1
;;
esac

echo "Running command: $PACK_CMD"
bash -c "$PACK_CMD"
echo ""
echo "With CACHE example"
echo ""
bash -c "$PACK_CMD"
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ This buildpack relies on [heroku/libcnb.rs][libcnb] to compile buildpacks. All
[libcnb.rs dependencies][libcnb-deps] will need to be setup prior to building
or testing this buildpack.

### Clone

This project uses submodules, to clone all code run:

```
$ git clone --recursive https://github.com/heroku/buildpacks-jvm
```

When working on a branch you may need to run:

```
$ git submodule update --init --remote --recursive
``

### Building

1. Run `cargo check` to download dependencies and ensure there are no
Expand Down
4 changes: 4 additions & 0 deletions buildpacks/jvm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- JDK overlays are now properly sourced from the `.jdk-overlay` directory instead of `.jdk_overlay`. ([#763](https://github.com/heroku/buildpacks-jvm/pull/763))

### Changed

- Buildpack output changed to a new format. ([#000](https://github.com/heroku/buildpacks-jvm/pull/000))

## [6.0.4] - 2024-12-05

### Added
Expand Down