From 4aea1753bd975c633e35391b8bd64f58222530e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 07:01:48 -0500 Subject: [PATCH 1/2] build(deps): bump actions/checkout from 2.3.4 to 2.3.5 (#1075) --- .github/workflows/build-multiarch.yml | 2 +- .github/workflows/generate-toc.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/pr.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index b9061cea..d8e98958 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Docker meta id: meta diff --git a/.github/workflows/generate-toc.yml b/.github/workflows/generate-toc.yml index 684d9a8d..cc95dbf7 100644 --- a/.github/workflows/generate-toc.yml +++ b/.github/workflows/generate-toc.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - run: | curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc chmod a+x gh-md-toc diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5fddc8cc..cfd228b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: Run tests run: | @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: Prepare id: prep diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8820d4f4..719067d6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: Run tests run: | From 393544a194a89dd6ff5e1c83fca5fad2ad5f0588 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 18 Oct 2021 21:58:53 -0500 Subject: [PATCH 2/2] Added support for Crucible server type #1052 --- Dockerfile | 2 +- README.md | 10 ++++++++ start-configuration | 12 ++++++++- start-deployCrucible | 60 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 start-deployCrucible diff --git a/Dockerfile b/Dockerfile index 1cd3bb19..b5b3aec6 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.2 +ARG MC_HELPER_VERSION=1.9.5 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/README.md b/README.md index ca6e9ec5..c24b8353 100644 --- a/README.md +++ b/README.md @@ -572,6 +572,16 @@ Configuration options with defaults: - `LIMBO_SCHEMA_FILENAME`=default.schem - `LEVEL`="Default;${LIMBO_SCHEMA_FILENAME}" +### Running a Crucible server + +A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`. + +Configuration options with defaults: + +- `CRUCIBLE_RELEASE`=latest + +Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`. + ## Running a server with a Feed the Beast modpack > **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version). diff --git a/start-configuration b/start-configuration index 5f3fa21a..c07422d8 100755 --- a/start-configuration +++ b/start-configuration @@ -176,11 +176,21 @@ case "${TYPE^^}" in exec ${SCRIPTS:-/}start-deployLimbo "$@" ;; + CRUCIBLE) + log "**********************************************************************" + log "WARNING: The image tag itzg/minecraft-server:java8 is recommended" + log " since some mods require Java 8" + log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader" + log " can be fixed with java8" + log "**********************************************************************" + exec "${SCRIPTS:-/}start-deployCrucible" "$@" + ;; + *) log "Invalid type: '$TYPE'" log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only)," log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM," - log " MAGMA, MOHIST, CATSERVER, AIRPLANE, CANYON, LIMBO" + log " MAGMA, MOHIST, CATSERVER, AIRPLANE, CANYON, LIMBO, CRUCIBLE" exit 1 ;; diff --git a/start-deployCrucible b/start-deployCrucible new file mode 100644 index 00000000..d204664c --- /dev/null +++ b/start-deployCrucible @@ -0,0 +1,60 @@ +#!/bin/bash + +# shellcheck source=start-utils +. "${SCRIPTS:-$(dirname "$0")}/start-utils" +set -o pipefail +set -e +isDebugging && set -x + +requireVar VANILLA_VERSION +: "${CRUCIBLE_RELEASE:=latest}" + +crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases +if [[ ${CRUCIBLE_RELEASE^^} = LATEST ]]; then + crucibleReleaseUrl=${crucibleReleasesUrl}/latest +else + crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE} +fi + +if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VANILLA_VERSION}-.*\.jar/)].browser_download_url" \ + --accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then + log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible" + exit 1 +fi + +if [[ $downloadUrl = null ]]; then + log "ERROR: failed to locate Crucible jar for $VANILLA_VERSION from ${CRUCIBLE_RELEASE}" + exit 1 +fi + +log "Downloading Crucible from $downloadUrl" +if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then + log "ERROR: failed to download Crucible jar from $downloadUrl" + exit 1 +fi + +librariesDir=/data/libraries +if [ ! -d "$librariesDir" ]; then + if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \ + --accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then + log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries" + exit 1 + fi + + log "Downloading Crucible libraries" + if ! get -o /tmp/libraries.zip "$librariesUrl"; then + log "ERROR: failed to download Crucible libraries from $librariesUrl" + exit 1 + fi + + if ! unzip /tmp/libraries.zip -d "$librariesDir"; then + log "ERROR: failed to unzip Crucible libraries" + exit 1 + fi + rm /tmp/libraries.zip +fi + +export SERVER +export SKIP_LOG4J_CONFIG=true + +exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"