Repository navigation
Add release selection for the GitHub-released server types - #4339
Conversation
|
Thank you for adding this. I would really prefer to enhance mc-image-helper's github command to handle non-latest versions https://github.com/itzg/mc-image-helper/tree/main/src/main/java/me/itzg/helpers/github If that isn't feasible for you, then I could apply your changes here and follow up later porting over that missing part of the helper. |
|
Thanks @itzg. I've added the enhancement to mc-image-helper: itzg/mc-image-helper#905 adds a |
|
Update: I've implemented your suggested approach in itzg/mc-image-helper#905:
Once that's released I'll switch this PR over and drop the direct-download workaround. While I was at it, I generalised the same mechanism to the other server types that ship an asset in a GitHub release, so this PR will grow to cover:
|
6633d59 to
8d38ac2
Compare
Add a <TYPE>_RELEASE option so a specific release tag can be selected instead of always the latest, for the server types that download an asset from a GitHub release: - PUMPKIN_RELEASE - POSEIDON_RELEASE - NANOLIMBO_RELEASE - KETTING_RELEASE CRUCIBLE and ARCLIGHT already had a release option, but resolved the release with a direct api.github.com call. They now use the shared mc-image-helper 'github download-asset' command, which resolves the release and matches the asset. This removes the direct API calls, honors GH_TOKEN for rate limit handling, and allows a pre-release, such as a Crucible staging tag, to be selected. mc-image-helper treats an omitted --release-tag as the latest release, so the release tag is only passed when a specific release was requested. This keeps <TYPE>_RELEASE=latest meaning the latest release. Depends on itzg/mc-image-helper#905, which adds --release-tag, renames download-latest-asset to download-asset, and leaves the tag unset by default (keeping the old name as an alias). MC_HELPER_VERSION will need to be bumped once itzg#905 is released.
8d38ac2 to
9a85767
Compare
itzg
left a comment
There was a problem hiding this comment.
Sorry for the ripple effect of my "latest" request in helper.
|
And thanks for retrofitting the others. |
|
java8 build is because the feature will need to be back-ported. I just now added more info about this https://github.com/itzg/mc-image-helper/blob/main/DEVELOPMENT.md#java-compatibility I can take care of doing that, if you want. |
| @@ -0,0 +1,7 @@ | |||
| mc-image-helper assert fileExists "/data/pumpkin-*-Linux" | |||
There was a problem hiding this comment.
The java25-alpine build verification failed since it seems to include the -musl suffix
[init] Using Pumpkin server executable /data/pumpkin-X64-Linux-musl
62b1ba9 to
8fb1f9c
Compare
|
Update on the java8 leg: I've opened the helper back-port per the process in DEVELOPMENT.md#java-compatibility.
Once it's merged and the next |
|
The java8 release is https://github.com/itzg/mc-image-helper/releases/tag/1.51.5-java8 and that will be great to bump the pinned versions within this PR. |
1.51.5-java8 back-ports the github download-asset release tag support (itzg/mc-image-helper#908), so the pre-Java 17 variants (java16, java11, java8, java8-jdk) can select a specific GitHub release. This fixes the java8 verify-pr leg, which failed with "Unmatched arguments ... 'download-asset'" against the pinned 1.51.4-java8.
|
The java8 leg is green now — thanks for the back-port release. Bumped the pinned helper from
All checks now pass (java8/java17/java25/java25-alpine/java25-graalvm, docs, verify). |
What this changes
Adds a consistent way to pick which upstream GitHub release a server type runs, via
<TYPE>_RELEASE, defaulting tolatest.The actual release lookup lives in mc-image-helper (itzg/mc-image-helper#905):
github download-assetgains--release-tag— when omitted it uses the latest release, otherwise it resolves/releases/tags/{tag}, so pre-releases are usable — and the command was renamed fromdownload-latest-asset, which is retained as an alias. The image only passes--release-tagwhen<TYPE>_RELEASEis set to something other thanlatest, solatestkeeps its meaning of "the latest release".Server types covered here:
PUMPKIN_RELEASEPOSEIDON_RELEASE— also removes the placeholder TODO fromstart-deployPoseidonNANOLIMBO_RELEASEKETTING_RELEASECRUCIBLE_RELEASE/ARCLIGHT_RELEASE— moved off their directapi.github.comcalls onto the shared helper, which drops the bespoke JSONPath asset matching and honoursGH_TOKENWhen the variable is unset, each type keeps its existing
latestbehavior.Testing
New setup-only tests pin a non-latest release for each type (
pumpkin-release,poseidon-release,nanolimbo-release,ketting-release,crucible-release,arclight-release), alongside the existinglatest-default tests for those types.Depends on itzg/mc-image-helper#905.