From 66c0558174c2a954c7f1c781b83247eab4abfcb6 Mon Sep 17 00:00:00 2001 From: itzg Date: Wed, 17 Nov 2021 00:55:17 +0000 Subject: [PATCH 01/12] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fac32d85..8c0f86ee 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running on RaspberryPi](#running-on-raspberrypi) * [Contributing](#contributing) - + From 817a01bbc31f7baa6ecdebad2e0a9577f89e08de Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Tue, 16 Nov 2021 19:05:14 -0600 Subject: [PATCH 02/12] misc: noted git ours merge strategy --- DEVELOPMENT.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 31dabece..6fbce060 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -95,3 +95,25 @@ The following git command can be used to provide the bulk of release notes conte ```shell script git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="* %s" 1.1.0..1.2.0 ``` +## Tracking changes from master without content + +The following script uses the [ours](https://git-scm.com/docs/merge-strategies#Documentation/merge-strategies.txt-ours) merging strategy to track the history from master into the other branches without actually bringing the changes over. It is useful when a change is specific to master only, such as bumping the base Java version for the `latest` image tag. + +```shell +branches=( + java8 + java8-multiarch + java8-openj9 + java11 + java11-openj9 + java16 + java16-openj9 + java17 +) + +for b in "${branches[@]}"; do + git checkout "$b" + git merge -s ours -m "Track latest from master" master + git push origin +done +``` \ No newline at end of file From 784ec6104c8220ea59bd7f8b8f476f8b37126ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vorburger=20=E2=9B=91=EF=B8=8F?= Date: Wed, 17 Nov 2021 21:22:01 +0100 Subject: [PATCH 03/12] Docs: Fix broken link to Aikar's Flags (#1126) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c0f86ee..59bde1ea 100644 --- a/README.md +++ b/README.md @@ -1371,7 +1371,7 @@ To enable remote JMX, such as for profiling with VisualVM or JMC, add the enviro ### Enable Aikar's Flags -[Aikar has does some research](https://mcflags.emc.gs/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using +[Aikar has does some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using -e USE_AIKAR_FLAGS=true From 442fccfc41876d27b61f4989588b497b36d601d8 Mon Sep 17 00:00:00 2001 From: itzg Date: Wed, 17 Nov 2021 20:22:20 +0000 Subject: [PATCH 04/12] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 59bde1ea..b5420279 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running on RaspberryPi](#running-on-raspberrypi) * [Contributing](#contributing) - + From 597faa102acf937a73d4370e122af05441487121 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 21 Nov 2021 11:16:47 -0600 Subject: [PATCH 05/12] misc: only run stale-check on cron schedule --- .github/workflows/stale-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/stale-check.yml b/.github/workflows/stale-check.yml index ddb9ef07..5709b313 100644 --- a/.github/workflows/stale-check.yml +++ b/.github/workflows/stale-check.yml @@ -1,7 +1,6 @@ name: Stale Check on: - issue_comment: schedule: - cron: 0 2 * * * From 71954edf75cd6f0fd7077e580756badedcdd718e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 21 Nov 2021 14:58:55 -0600 Subject: [PATCH 06/12] misc: silence misleading error when resolving forge version --- Dockerfile | 2 +- scripts/start-deployForge | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26d78bc5..6c0b6fda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.9.6 +ARG MC_HELPER_VERSION=1.9.10 ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION} RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \ | tar -C /usr/share -zxf - \ diff --git a/scripts/start-deployForge b/scripts/start-deployForge index c531caaf..85386713 100755 --- a/scripts/start-deployForge +++ b/scripts/start-deployForge @@ -11,8 +11,8 @@ get_installer() { log "Downloading $normForgeVersion" forgeFileNames=" - $normForgeVersion/forge-$normForgeVersion-installer.jar $shortForgeVersion/forge-$shortForgeVersion-installer.jar + $normForgeVersion/forge-$normForgeVersion-installer.jar " for fn in $forgeFileNames; do @@ -102,7 +102,7 @@ resolve_versions() { ;; RECOMMENDED) - if ! FORGE_VERSION=$(get --json-path ".promos['$VANILLA_VERSION-recommended']" "$promosUrl"); then + if ! FORGE_VERSION=$(get -s --json-path ".promos['$VANILLA_VERSION-recommended']" "$promosUrl"); then if ! FORGE_VERSION=$(get --json-path ".promos['$VANILLA_VERSION-latest']" "$promosUrl"); then log "ERROR: Version $VANILLA_VERSION is not supported by Forge" log " Refer to http://files.minecraftforge.net/ for supported versions" From f8ac58e200347a369ca4f8b673dc9477f9643a28 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 21 Nov 2021 15:00:17 -0600 Subject: [PATCH 07/12] misc: deprecated java16 --- README.md | 2 +- docker-versions-create.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index b5420279..4a29f54a 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,6 @@ To use a different version of Java, please use a docker tag to run your Minecraf | java8-openj9 | 8 | Debian | OpenJ9 | amd64 | | java11 | 11 | Debian | Hotspot | amd64,arm64,armv7 | | java11-openj9 | 11 | Debian | OpenJ9 | amd64 | -| java16 | 16 | Debian | Hotspot | amd64,arm64,armv7 | | java16-openj9 | 16 | Debian | OpenJ9 | amd64 | | java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 | @@ -298,6 +297,7 @@ The following image tags have been deprecated and are no longer receiving update - adopt15 - openj9-nightly - multiarch-latest +- java16 ## Healthcheck diff --git a/docker-versions-create.sh b/docker-versions-create.sh index a68603e8..5a2f8226 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -7,7 +7,6 @@ branches_list=( 'java8-openj9' 'java11' 'java11-openj9' - 'java16' 'java16-openj9' 'java17' ) From 57f7ee50a6ddaa7050b999fff5f92559b3967123 Mon Sep 17 00:00:00 2001 From: itzg Date: Sun, 21 Nov 2021 21:00:21 +0000 Subject: [PATCH 08/12] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a29f54a..15b7095a 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running on RaspberryPi](#running-on-raspberrypi) * [Contributing](#contributing) - + From 66a17c8d589e7ebee60a2a789024e0522f039d26 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 22 Nov 2021 17:19:41 -0600 Subject: [PATCH 09/12] docs: added readinessProbe to k8s example --- examples/k8s/using-statefulset.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/examples/k8s/using-statefulset.yml b/examples/k8s/using-statefulset.yml index 92423eb8..04fbff6c 100644 --- a/examples/k8s/using-statefulset.yml +++ b/examples/k8s/using-statefulset.yml @@ -3,18 +3,18 @@ apiVersion: apps/v1 kind: StatefulSet metadata: labels: - app: example - name: example + app: mc-example + name: mc-example spec: replicas: 1 - serviceName: example + serviceName: mc-example selector: matchLabels: - app: example + app: mc-example template: metadata: labels: - app: example + app: mc-example spec: containers: - name: mc @@ -25,6 +25,18 @@ spec: volumeMounts: - mountPath: /data name: data + readinessProbe: + exec: + command: + - mc-monitor + - status + - --host + - localhost + - --port + - "25565" + initialDelaySeconds: 30 + periodSeconds: 5 + failureThreshold: 18 volumeClaimTemplates: - metadata: name: data @@ -39,12 +51,12 @@ apiVersion: v1 kind: Service metadata: labels: - service: example - name: example + service: mc-example + name: mc-example spec: ports: - port: 25565 targetPort: 25565 selector: - app: example - type: LoadBalancer + app: mc-example + type: NodePort From 5e8fc43857601b0f4b876930e791baa5774556d2 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 22 Nov 2021 20:51:30 -0600 Subject: [PATCH 10/12] fix: removed Java 8 constraint of Canyon server type #1129 --- README.md | 8 +++----- scripts/start-deployCanyon | 11 +++-------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 15b7095a..ccf4d957 100644 --- a/README.md +++ b/README.md @@ -502,17 +502,15 @@ A [Catserver](http://catserver.moe/) type server can be used with > **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored -### Running an Canyon server +### Running a Canyon server [Canyon](https://github.com/canyonmodded/canyon) is a fork of CraftBukkit for Minecraft Beta 1.7.3. It includes multiple enhancements whilst also retaining compatibility with old Bukkit plugins and mods as much as possible. -e VERSION=b1.7.3 -e TYPE=CANYON -> **NOTE** only `VERSION=b1.7.3` is supported +> **NOTE** only `VERSION=b1.7.3` is supported. Since that version pre-dates the health check mechanism used by this image, that will need to be disabled by setting `DISABLE_HEALTHCHECK=true`. -> **NOTE** only Java 8 is supported - -By default the latest build will be used; however, a specific build number can be selected by setting `CANYON_BUILD`, such as +By default, the latest build will be used; however, a specific build number can be selected by setting `CANYON_BUILD`, such as -e CANYON_BUILD=11 diff --git a/scripts/start-deployCanyon b/scripts/start-deployCanyon index 4a31ac1c..a9ed0302 100755 --- a/scripts/start-deployCanyon +++ b/scripts/start-deployCanyon @@ -2,16 +2,11 @@ set -euo pipefail IFS=$'\n\t' -. ${SCRIPTS:-/}start-utils +# shellcheck source=start-utils +. "${SCRIPTS:-/}start-utils" isDebugging && set -x -: ${CANYON_BUILD:=lastSuccessfulBuild} -JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1) - -if [ "${JAVA_VER}" != "8" ]; then - log "ERROR: Canyon server type only supports Java version 8" - exit 1 -fi +: "${CANYON_BUILD:=lastSuccessfulBuild}" if [ "${VERSION}" != "b1.7.3" ]; then log "ERROR: Canyon server type only supports VERSION=b1.7.3" From 84c577cc96c450e469cc46a118088c8e39f6305d Mon Sep 17 00:00:00 2001 From: itzg Date: Tue, 23 Nov 2021 02:51:46 +0000 Subject: [PATCH 11/12] docs: Auto update markdown TOC --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ccf4d957..1a7ff69c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running a Magma server](#running-a-magma-server) * [Running a Mohist server](#running-a-mohist-server) * [Running a Catserver type server](#running-a-catserver-type-server) - * [Running an Canyon server](#running-an-canyon-server) + * [Running a Canyon server](#running-a-canyon-server) * [Running a SpongeVanilla server](#running-a-spongevanilla-server) * [Running a Fabric Server](#running-a-fabric-server) * [Running a Limbo server](#running-a-limbo-server) @@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running on RaspberryPi](#running-on-raspberrypi) * [Contributing](#contributing) - + From dca29dcbb5d357811e5114b23f16e59126069a54 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 24 Nov 2021 14:30:20 -0600 Subject: [PATCH 12/12] feat: use server list ping for versions less than 1.7 #1131 --- Dockerfile | 2 +- bin/mc-health | 5 ++++- scripts/start-configuration | 8 ++++++++ scripts/start-deployFTBA | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c0b6fda..485efcae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ - --var version=0.10.1 --var app=mc-monitor --file {{.app}} \ + --var version=0.10.3 --var app=mc-monitor --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ diff --git a/bin/mc-health b/bin/mc-health index 9c39ba4a..d5f2f65c 100755 --- a/bin/mc-health +++ b/bin/mc-health @@ -2,6 +2,9 @@ # shellcheck source=../scripts/start-utils . "${SCRIPTS:-/}start-utils" +if [ -f /data/.mc-health.env ]; then + . /data/.mc-health.env +fi if isTrue "${DISABLE_HEALTHCHECK}"; then echo "Healthcheck disabled" @@ -10,6 +13,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' | echo "Java process suspended by Autopause function" exit 0 else - mc-monitor status --host localhost --port "${SERVER_PORT:-25565}" + mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}" exit $? fi diff --git a/scripts/start-configuration b/scripts/start-configuration index bea25b40..4afe71ee 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -92,6 +92,14 @@ if isTrue "${ENABLE_AUTOPAUSE}"; then ${SCRIPTS:-/}start-autopause fi +if versionLessThan 1.7; then + echo " +MC_HEALTH_EXTRA_ARGS=( + --use-server-list-ping +) + " > /data/.mc-health.env +fi + log "Resolving type given ${TYPE}" case "${TYPE^^}" in *BUKKIT|SPIGOT) diff --git a/scripts/start-deployFTBA b/scripts/start-deployFTBA index 5c6f5c49..0e1d3463 100755 --- a/scripts/start-deployFTBA +++ b/scripts/start-deployFTBA @@ -67,7 +67,7 @@ variants=( forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar fabric-${mcVersion}-${fabricVersion}-server-launch.jar ) -for f in ${variants[@]}; do +for f in "${variants[@]}"; do if [ -f $f ]; then export SERVER=$f break