From f473cfc6f2dcfaa5d95b41c3d60013a38733f3d2 Mon Sep 17 00:00:00 2001 From: Stealthii Date: Thu, 20 May 2021 02:16:57 +0100 Subject: [PATCH 1/3] Add support for Canyon server for b1.7.3 (#879) --- README.md | 14 ++++++++++++ start-configuration | 10 ++++++--- start-deployCanyon | 54 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 start-deployCanyon diff --git a/README.md b/README.md index a5424552..38bad73b 100644 --- a/README.md +++ b/README.md @@ -483,6 +483,20 @@ 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 + +[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 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 + + -e CANYON_BUILD=11 + ### Running a SpongeVanilla server Enable SpongeVanilla server mode by adding a `-e TYPE=SPONGEVANILLA` to your command-line. diff --git a/start-configuration b/start-configuration index c02bce98..b6b119ac 100644 --- a/start-configuration +++ b/start-configuration @@ -163,16 +163,20 @@ case "${TYPE^^}" in YATOPIA) exec ${SCRIPTS:-/}start-deployYatopia "$@" ;; - - AIRPLANE) + + AIRPLANE) exec ${SCRIPTS:-/}start-deployAirplane "$@" ;; + CANYON) + exec ${SCRIPTS:-/}start-deployCanyon "$@" + ;; + *) log "Invalid type: '$TYPE'" log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only)," log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR" - log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE" + log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON" exit 1 ;; diff --git a/start-deployCanyon b/start-deployCanyon new file mode 100644 index 00000000..4a31ac1c --- /dev/null +++ b/start-deployCanyon @@ -0,0 +1,54 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +. ${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 + +if [ "${VERSION}" != "b1.7.3" ]; then + log "ERROR: Canyon server type only supports VERSION=b1.7.3" + exit 1 +fi + +canyonJob="https://ci.velocitypowered.com/job/Canyon" + +buildRelPath=$( + curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" | + jq -r '.artifacts[0].relativePath' +) +buildNumber=$( + curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" | + jq -r '.number' +) +baseName=$(basename "${buildRelPath}") + +# Add build tag to non-tagged builds for version detection +if [ ${baseName%.*} = 'canyon-server' ]; then + export SERVER=${baseName%.*}_build${buildNumber}.jar +else + export SERVER="${baseName}" +fi + +if [ ! -f "$SERVER" ]; then + downloadUrl="${canyonJob}/${CANYON_BUILD}/artifact/${buildRelPath}" + log "Downloading Canyon build ${buildNumber} from $downloadUrl ..." + curl -fsSL -o "$SERVER" "$downloadUrl" + if [ ! -f "$SERVER" ]; then + log "ERROR: failed to download from $downloadUrl (status=$?)" + exit 3 + fi +fi + +# Normalize on Spigot for later operations +export TYPE=SPIGOT +export SKIP_LOG4J_CONFIG=true + +exec ${SCRIPTS:-/}start-spiget "$@" From 3084a2f409f616711f9eb26a89eaf6937c03d561 Mon Sep 17 00:00:00 2001 From: itzg Date: Thu, 20 May 2021 01:17:12 +0000 Subject: [PATCH 2/3] Auto update markdown TOC --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38bad73b..797590a5 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,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 SpongeVanilla server](#running-a-spongevanilla-server) * [Running a Fabric Server](#running-a-fabric-server) * [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack) @@ -142,7 +143,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 fa60f8c16eb09d9e97f21af363fd19025308df69 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 19 May 2021 20:23:12 -0500 Subject: [PATCH 3/3] ci: exclude java8 from multiarch builds --- .github/workflows/build-multiarch.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index d810a02a..a2dcb1eb 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -6,10 +6,14 @@ on: - multiarch-latest - java* - test/multiarch/* + branches-ignore: + - java8 tags: - "[0-9]+.[0-9]+.[0-9]+-multiarch" - "[0-9]+.[0-9]+.[0-9]+-multiarch-latest" - "[0-9]+.[0-9]+.[0-9]+-java*" + tags-ignore: + - "[0-9]+.[0-9]+.[0-9]+-java8" paths-ignore: - "*.md" - "docs/**"