From 38946fd2948cf9a428d9d4a0916b3c66e6deb3eb Mon Sep 17 00:00:00 2001 From: Christoph Mittermaier Date: Wed, 23 Jun 2021 01:39:05 +0200 Subject: [PATCH 01/13] fixed typo in readme (#932) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 378df37a..d97829f3 100644 --- a/README.md +++ b/README.md @@ -1291,7 +1291,7 @@ disable that by passing `-e GUI=FALSE`. ### Stop Duration -When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By defaul it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds. +When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds. ## Autopause From dae2add71387a6db8debea16319f274f0ebd4bc6 Mon Sep 17 00:00:00 2001 From: itzg Date: Tue, 22 Jun 2021 23:39:21 +0000 Subject: [PATCH 02/13] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d97829f3..3d59d484 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From adbe75ae7ecd4e21c1c5a97347556c33ccc1e24a Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 21:06:29 -0500 Subject: [PATCH 03/13] ci: limits generate-toc workflow to itzg's --- .github/workflows/generate-toc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 104e8f3f..37ca526b 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -7,6 +7,7 @@ on: - README.md jobs: generate: + if: github.repository == 'itzg/minecraft-server' runs-on: ubuntu-latest timeout-minutes: 5 steps: From 6f2f1174e666bde152caeb79fb6b57be19ed608f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 21:07:22 -0500 Subject: [PATCH 04/13] ci: limited build-multiarch workflow to itzg's --- .github/workflows/build-multiarch.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 647f33c5..bd15e03f 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -23,6 +23,7 @@ on: jobs: docker-buildx: + if: github.repository == 'itzg/minecraft-server' runs-on: ubuntu-20.04 env: CACHE_NAME: master From 33b48a8a4b9fea340b339db2cb2d4248a9bb21f3 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 21:09:20 -0500 Subject: [PATCH 05/13] ci: used ${{ }} syntax in job conditional --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/generate-toc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index bd15e03f..6d201a55 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -23,7 +23,7 @@ on: jobs: docker-buildx: - if: github.repository == 'itzg/minecraft-server' + if: ${{ github.repository == 'itzg/minecraft-server' }} runs-on: ubuntu-20.04 env: CACHE_NAME: master diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 37ca526b..3a48113b 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -7,7 +7,7 @@ on: - README.md jobs: generate: - if: github.repository == 'itzg/minecraft-server' + if: ${{ github.repository == 'itzg/minecraft-server' }} runs-on: ubuntu-latest timeout-minutes: 5 steps: From e300810a16fbdf593f58e8d7d36a90926e9c5d7b Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 21:20:37 -0500 Subject: [PATCH 06/13] ci: fixed repo name in workflows conditional --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/generate-toc.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 6d201a55..492e368e 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -23,7 +23,7 @@ on: jobs: docker-buildx: - if: ${{ github.repository == 'itzg/minecraft-server' }} + if: github.repository == 'itzg/docker-minecraft-server' runs-on: ubuntu-20.04 env: CACHE_NAME: master diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 3a48113b..19e259e2 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -7,7 +7,7 @@ on: - README.md jobs: generate: - if: ${{ github.repository == 'itzg/minecraft-server' }} + if: github.repository == 'itzg/docker-minecraft-server' runs-on: ubuntu-latest timeout-minutes: 5 steps: From bc8af2784fe49fc5afdacdd5576251aea7dda1fa Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 21:57:32 -0500 Subject: [PATCH 07/13] ci: added merge-variants workflow --- .github/workflows/merge-variants.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/merge-variants.yml diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml new file mode 100644 index 00000000..9b56c7ba --- /dev/null +++ b/.github/workflows/merge-variants.yml @@ -0,0 +1,16 @@ +name: Merge image variants +on: + push: + branches: + - master +jobs: + merge: + if: github.repository == 'itzg/docker-minecraft-server' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v2.3.4 + - run: | + git config --add user.name "${GITHUB_ACTOR:-Github Actions}" + git config --add user.email "actions@github.com" + ./docker-versions.create.sh From 20cd8cce1dcf31c2d45f4e0e947a715ad36ae9cf Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 22:07:32 -0500 Subject: [PATCH 08/13] ci: fixed typo in calling docker-versions-create.sh --- .github/workflows/merge-variants.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml index 9b56c7ba..3d10249a 100644 --- a/.github/workflows/merge-variants.yml +++ b/.github/workflows/merge-variants.yml @@ -13,4 +13,4 @@ jobs: - run: | git config --add user.name "${GITHUB_ACTOR:-Github Actions}" git config --add user.email "actions@github.com" - ./docker-versions.create.sh + ./docker-versions-create.sh From 0064c0357f6abd90e05902f42089876a630a3543 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 22:11:41 -0500 Subject: [PATCH 09/13] ci: merge-variants: fetch all history and batch mode --- .github/workflows/merge-variants.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml index 3d10249a..5f539825 100644 --- a/.github/workflows/merge-variants.yml +++ b/.github/workflows/merge-variants.yml @@ -10,7 +10,11 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v2.3.4 - - run: | + with: + # fetch all history for merging operations + fetch-depth: 0 + - name: Run docker-versions-create + run: | git config --add user.name "${GITHUB_ACTOR:-Github Actions}" git config --add user.email "actions@github.com" - ./docker-versions-create.sh + ./docker-versions-create.sh -b From b1fed818213b913aa4b35e63b6e06f11b68de4cc Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 22:24:12 -0500 Subject: [PATCH 10/13] ci: merge-variants: skip any workflow changes --- .github/workflows/merge-variants.yml | 2 +- docker-versions-create.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml index 5f539825..2597dc87 100644 --- a/.github/workflows/merge-variants.yml +++ b/.github/workflows/merge-variants.yml @@ -17,4 +17,4 @@ jobs: run: | git config --add user.name "${GITHUB_ACTOR:-Github Actions}" git config --add user.email "actions@github.com" - ./docker-versions-create.sh -b + ./docker-versions-create.sh -b -w diff --git a/docker-versions-create.sh b/docker-versions-create.sh index 6f8b7d0c..017b2c9f 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -18,8 +18,9 @@ function TrapExit { } batchMode=false +skipWorkflowChanges=false -while getopts "hbt:s" arg +while getopts "hbt:sw" arg do case $arg in b) @@ -31,6 +32,9 @@ do s) tagArgs="-s -m 'Signed during docker-versions-create" ;; + w) + skipWorkflowChanges=true + ;; h) echo " Usage $0 [options] @@ -41,6 +45,7 @@ Options: -t TAG tag and push the current revision on master with the given tag and apply respective tags to each branch -s enable signed tags + -w skip any changes to .github/workflows -h display this help and exit " exit @@ -86,6 +91,7 @@ for branch in "${branches_list[@]}"; do if git merge -m 'Auto-merging via docker-versions-create' master; then proceed="True" echo "Branch $branch updated to current master successfully" + ${skipWorkflowChanges} && git restore .github/workflows # pushing changes to remote for this branch git commit -m "Auto merge branch with master" -a # push may fail if remote doesn't have this branch yet. In this case - sending branch From 2533d2c69468d6e9ed181e08f12fcb684720eea3 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 23 Jun 2021 22:29:24 -0500 Subject: [PATCH 11/13] ci: merge-variants: revert previous change --- .github/workflows/merge-variants.yml | 2 +- docker-versions-create.sh | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/merge-variants.yml b/.github/workflows/merge-variants.yml index 2597dc87..5f539825 100644 --- a/.github/workflows/merge-variants.yml +++ b/.github/workflows/merge-variants.yml @@ -17,4 +17,4 @@ jobs: run: | git config --add user.name "${GITHUB_ACTOR:-Github Actions}" git config --add user.email "actions@github.com" - ./docker-versions-create.sh -b -w + ./docker-versions-create.sh -b diff --git a/docker-versions-create.sh b/docker-versions-create.sh index 017b2c9f..6f8b7d0c 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -18,9 +18,8 @@ function TrapExit { } batchMode=false -skipWorkflowChanges=false -while getopts "hbt:sw" arg +while getopts "hbt:s" arg do case $arg in b) @@ -32,9 +31,6 @@ do s) tagArgs="-s -m 'Signed during docker-versions-create" ;; - w) - skipWorkflowChanges=true - ;; h) echo " Usage $0 [options] @@ -45,7 +41,6 @@ Options: -t TAG tag and push the current revision on master with the given tag and apply respective tags to each branch -s enable signed tags - -w skip any changes to .github/workflows -h display this help and exit " exit @@ -91,7 +86,6 @@ for branch in "${branches_list[@]}"; do if git merge -m 'Auto-merging via docker-versions-create' master; then proceed="True" echo "Branch $branch updated to current master successfully" - ${skipWorkflowChanges} && git restore .github/workflows # pushing changes to remote for this branch git commit -m "Auto merge branch with master" -a # push may fail if remote doesn't have this branch yet. In this case - sending branch From f5a319b0b39c7c797e5104cf808e249fc8d93a35 Mon Sep 17 00:00:00 2001 From: Jawa_Juice <67296752+Jawa-Juice@users.noreply.github.com> Date: Wed, 23 Jun 2021 23:29:58 -0400 Subject: [PATCH 12/13] Move to new Airplane download system (#933) Co-authored-by: Jawa-Juice --- README.md | 9 ++++++--- start-deployAirplane | 31 +++++++++++++++++++------------ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3d59d484..22b47746 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + @@ -450,15 +450,18 @@ An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of T -e TYPE=AIRPLANE -> **NOTE** only `VERSION=LATEST` is supported +> NOTE: The `VERSION` variable is used to select an Airplane branch to download from. The available options are "LATEST" "1.16" "1.17" and "PURPUR" + +> NOTE: The 1.17 branch is currently in beta. Use at your own risk! Extra variables: +- `AIRPLANE_BUILD=lastSuccessfulBuild` : set a specific Airplane build to use - `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler ### Running a Purpur server -A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of Tuinity.". +A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of Tuinity." -e TYPE=PURPUR diff --git a/start-deployAirplane b/start-deployAirplane index 0ce0b35d..dae242bb 100644 --- a/start-deployAirplane +++ b/start-deployAirplane @@ -5,23 +5,30 @@ IFS=$'\n\t' . ${SCRIPTS:-/}start-utils isDebugging && set -x -JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1) - -if [ "${JAVA_VER}" = "8" ]; then - JDK=8 -else - JDK=11 -fi - -if [ "${VERSION}" != "LATEST" ]; then - log "ERROR: Airplane server type only supports VERSION=LATEST" +if [ "${VERSION}" != "LATEST" ] && [ "${VERSION}" != "1.16" ] && [ "${VERSION}" != "1.17" ] && [ "${VERSION}" != "PURPUR" ]; then + log "ERROR: Airplane server type only supports VERSION=LATEST, VERSION=1.16, VERSION=1.17 or VERSION=PURPUR. Note that these are branches, not #.#.# versions." exit 1 fi -export SERVER=airplane-${VANILLA_VERSION}-jdk${JDK}.jar +: ${AIRPLANE_BUILD:=lastSuccessfulBuild} + +if [ "${VERSION}" = "LATEST" ] || [ "${VERSION}" = "1.16" ]; then + AIRPLANE_BRANCH="1.16" +fi + +if [ "${VERSION}" = "1.17" ]; then + AIRPLANE_BRANCH="1.17" + log "Airplane 1.17 is in beta. Use at your own risk!" +fi + +if [ "${VERSION}" = "PURPUR" ]; then + AIRPLANE_BRANCH="PURPUR-1.16" +fi + +export SERVER=airplane-${AIRPLANE_BRANCH}-${AIRPLANE_BUILD}.jar if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then - downloadUrl="https://dl.airplane.gg/latest/Airplane-JDK${JDK}/launcher-airplane.jar" + downloadUrl="https://ci.tivy.ca/job/Airplane-${AIRPLANE_BRANCH}/${AIRPLANE_BUILD}/artifact/launcher-airplane.jar" log "Downloading Airplane from $downloadUrl ..." curl -fsSL -o "$SERVER" "$downloadUrl" if [ ! -f "$SERVER" ]; then From 2e4cf0b731d7b3d504d387750a4d9b153d322ddd Mon Sep 17 00:00:00 2001 From: itzg Date: Thu, 24 Jun 2021 03:30:11 +0000 Subject: [PATCH 13/13] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22b47746..63980cab 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - +