build: java8 is now consistently multi-arch like others and new java8-alpine (#2763)

This commit is contained in:
Geoff Bourne 2024-04-07 10:53:37 -05:00 committed by GitHub
parent 665ca9c61a
commit 8f13cd4496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 26 deletions

View File

@ -31,9 +31,8 @@ jobs:
- java8-multiarch
- java8-openj9
- java8-jdk
- java8-alpine
- java11
- java11-openj9
- java11-jdk
include:
# JAVA 21:
- variant: java21-graalvm
@ -75,16 +74,12 @@ jobs:
baseImage: adoptopenjdk:11-jre-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.5
- variant: java11-jdk
baseImage: adoptopenjdk:11-jdk-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.5
- variant: java11-openj9
baseImage: ibm-semeru-runtimes:open-11-jre
platforms: linux/amd64,linux/arm64
mcVersion: 1.16.5
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
- variant: java8
baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.12.2
- variant: java8-alpine
baseImage: openjdk:8-jre-alpine3.9
platforms: linux/amd64
mcVersion: 1.12.2
@ -92,10 +87,6 @@ jobs:
baseImage: ghcr.io/graalvm/graalvm-ce:java8
platforms: linux/amd64
mcVersion: 1.12.2
- variant: java8-multiarch
baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.12.2
- variant: java8-jdk
baseImage: eclipse-temurin:8u312-b07-jdk-focal
platforms: linux/amd64,linux/arm64
@ -105,7 +96,7 @@ jobs:
platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2
env:
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
MAIN_VARIANT: java21
runs-on: ubuntu-22.04
@ -136,6 +127,8 @@ jobs:
type=raw,value=stable,enable=${{ github.ref_type == 'tag' && matrix.variant == env.MAIN_VARIANT }}
# apply the variant as a moving tag for most recent commit per variant
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }}
# for backward compatibility with users referencing java8-multiarch, this will set an extra label on java8
type=raw,value=java8-multiarch,enable=${{ matrix.variant == 'java8' && github.ref_name == github.event.repository.default_branch }}
# NOTE this identifies which variant will be published as "latest", which isn't
# necessarily the newest version of Java
flavor: |

View File

@ -17,26 +17,26 @@ jobs:
matrix:
variant:
- java21
- java21-alpine
- java17
- java17-alpine
- java8-multiarch
- java8
include:
# JAVA 21:
- variant: java21
baseImage: eclipse-temurin:21-jre
platforms: linux/amd64,linux/arm64
mcVersion: latest
- variant: java21-alpine
baseImage: eclipse-temurin:21-jre-alpine
platforms: linux/amd64
mcVersion: latest
# JAVA 17:
- variant: java17
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
baseImage: eclipse-temurin:17-jre-focal
platforms: linux/amd64
mcVersion: latest
- variant: java17-alpine
baseImage: eclipse-temurin:17-jre-alpine
platforms: linux/amd64
mcVersion: latest
- variant: java8-multiarch
- variant: java8
baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64
mcVersion: 1.12.2

View File

@ -23,11 +23,9 @@ where `<tag>` refers to the first column of this table:
| java17-graalvm | 17 | Oracle | Oracle GraalVM[^1] | amd64,arm64 |
| java17-alpine | 17 | Alpine | Hotspot | amd64 |
| java11 | 11 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java11-jdk | 11 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
| java8 | 8 | Alpine | Hotspot | amd64 |
| java8 | 8 | Ubuntu | Hotspot | amd64 |
| java8-alpine | 8 | Alpine | Hotspot | amd64 |
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
| java8-multiarch | 8 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
@ -116,5 +114,7 @@ The following image tags have been deprecated and are no longer receiving update
- java16/java16-openj9
- java17-graalvm-ce
- java20-graalvm, java20, java20-alpine
- java8 is now based on Ubuntu and multi-architecture. Use `java8-alpine` for the Alpine based image
- java8-multiarch is still built and pushed, but please move to java8 instead
[^1]: Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.