Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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 a Loliserver type server](#running-a-loliserver-type-server)
* [Running a Canyon server](#running-a-canyon-server)
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
* [Running a Limbo server](#running-a-limbo-server)
Expand Down Expand Up @@ -591,6 +592,16 @@ A [Catserver](http://catserver.moe/) type server can be used with

> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored

### Running a Loliserver type server

A [Loliserver](https://github.com/Loli-Server/LoliServer) type server can be used with

-e TYPE=LOLISERVER

> **NOTE** Loliserver only provides a single release stream, so `VERSION` is ignored

> **Disclaimer** The retrieval of the serverjar is not bulletproof. It can and probably will change in the future.

### 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.
Expand Down
7 changes: 6 additions & 1 deletion scripts/start-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ case "${TYPE^^}" in
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
;;

LOLISERVER)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployLoliserver" "$@"
;;

PURPUR)
exec "${SCRIPTS:-/}start-deployPurpur" "$@"
;;
Expand Down Expand Up @@ -248,7 +253,7 @@ case "${TYPE^^}" in
log "Invalid type: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
log " CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
log " MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH, CANYON, LIMBO, CRUCIBLE"
log " MAGMA, MOHIST, CATSERVER, LOLISERVER, AIRPLANE, PUFFERFISH, CANYON, LIMBO, CRUCIBLE"
exit 1
;;

Expand Down
32 changes: 32 additions & 0 deletions scripts/start-deployLoliserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
set -o pipefail
set -e

latestAsset=$(
curl -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs | \
jq '.assets[] | select(.name | match(".*-server.jar"))'
)

if [[ -z "${latestAsset}" ]]; then
log "ERROR: latest release of Loliserver is missing server.jar asset"
exit 1
fi

isDebugging && log "Latest asset ${latestAsset}"
latestJarName=$(echo ${latestAsset} | jq --raw-output '.name')
latestJarId=$(echo ${latestAsset} | jq --raw-output '.id')


export SERVER="/data/${latestJarName}"

if [ ! -f ${SERVER} ]; then
log "Downloading ${latestJarName}"
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs/${latestJarId}
fi

export FAMILY=HYBRID

exec "${SCRIPTS:-/}start-setupWorld" "$@"
13 changes: 13 additions & 0 deletions tests/setuponlytests/loliserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"

services:
mc:
restart: "no"
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
environment:
EULA: "TRUE"
SETUP_ONLY: "TRUE"
TYPE: LOLISERVER
VERSION: ${MINECRAFT_VERSION:-LATEST}
volumes:
- ./data:/data
1 change: 1 addition & 0 deletions tests/setuponlytests/loliserver/require.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[ $MINECRAFT_VERSION == 1.16.5 ]] || exit 1
1 change: 1 addition & 0 deletions tests/setuponlytests/loliserver/verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mc-image-helper assert fileExists "/data/LoliServer-*.jar"