feat: add native app-image launcher distribution#172
Open
golemcore1 wants to merge 12 commits intomainfrom
Open
feat: add native app-image launcher distribution#172golemcore1 wants to merge 12 commits intomainfrom
golemcore1 wants to merge 12 commits intomainfrom
Conversation
# Conflicts: # .github/workflows/release.yml # README.md
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR introduces a native local distribution path for GolemCore Bot and makes launcher behavior consistent across staged updates, bundled app-image runtime jars, and the legacy classpath fallback.
At the packaging level, the release workflow now builds platform-specific native app-image bundles in addition to the executable JAR and publishes those archives together with updated SHA-256 checksums. To support local development and manual packaging, the repository also includes a reusable build script under
.github/scripts/plus annpxentry point that generates the same native archive format locally.At runtime,
RuntimeLauncheris extended so that a native launcher can start the bot using the same self-update model that already exists for the JAR flow. The launcher now resolves runtime in a deterministic order: first a staged update selected throughupdates/current.txt, then the bundled runtime JAR embedded in the app-image, and finally the existing Jib/classpath fallback. This keeps local native bundles compatible with staged updates without introducing a separate execution model.The native launcher itself is now implemented with
picocli. It exposes documented launcher-specific options, converts launcher-level overrides into child JVM/system properties where appropriate, and still forwards unmatched Spring Boot arguments to the spawned runtime unchanged. This gives the native bundle a real CLI surface instead of relying only on raw pass-through arguments.To make the new behavior durable, the test suite for
RuntimeLauncheris expanded to cover bundled runtime resolution, picocli argument parsing, launcher option forwarding, property precedence rules, help/version flows, and the fallback path when no valid bundled runtime JAR is available.Documentation is updated across the README, quick start, deployment guide, and configuration reference so users can understand:
Native launcher parameters
All native launcher parameters are optional. Running the app-image with no arguments is valid.
--storage-path=<path>--bot.storage.local.base-path=<path>-Dbot.storage.local.base-path=...to the child runtimebot.storage.local.base-pathif already set, otherwise environmentSTORAGE_PATH, otherwise no explicit launcher override--updates-path=<path>--bot.update.updates-path=<path>-Dbot.update.updates-path=...to the child runtimebot.update.updates-pathif already set, otherwise environmentUPDATE_PATH, otherwise derives from storage path, otherwise falls back to${user.home}/.golemcore/workspace/updates--bundled-jar=<path>--golemcore.launcher.bundled-jar=<path>golemcore.launcher.bundled-jarif set, otherwise environmentGOLEMCORE_BUNDLED_JAR, otherwise auto-discovers the bundled JAR from the app-image layout, otherwise falls back to classpath mode--server-port=<port>--server.port=<port>-Dserver.port=...to the child runtimeserver.portif already set, otherwise no explicit launcher override and Spring Boot default behavior remains in effect-J=<jvm-option>--java-option=<jvm-option>-h--helpfalse-V--versionfalseUnmatched arguments are still forwarded to Spring Boot unchanged, including standard
-D...JVM properties, Spring--...arguments such as--spring.profiles.active=prod, and arguments placed after--.