From 94b0e1c1cfff56a2eba3b789d27b7fa48f5ba506 Mon Sep 17 00:00:00 2001 From: Nicholas Dille Date: Mon, 6 Jan 2025 19:40:58 +0100 Subject: [PATCH] Added minecraft --- .gitlab-ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4fc9ca..c536e5e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,6 @@ workflow: - if: $CI_PIPELINE_SOURCE == "push" - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "true" - include: - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA inputs: @@ -15,6 +14,28 @@ include: | head -n 1 \ | sed -E 's/^.+version="([^"]+)".+$/\\1/' +include: +- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA + inputs: + name: floodgate + command: | + curl -sSLf https://download.geysermc.org/v2/projects/floodgate \ + | jq --raw-output '.versions[-1]' \ + | xargs -I{} \ + curl -sSLf https://download.geysermc.org/v2/projects/floodgate/versions/{}/builds \ + | jq --raw-output '"\(.version).\(.builds | map(select(.channel == "default")) | .[-1].build)"' + +include: +- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA + inputs: + name: geyser + command: | + curl -sSLf https://download.geysermc.org/v2/projects/geyser \ + | jq --raw-output '.versions[-1]' \ + | xargs -I{} \ + curl -sSLf https://download.geysermc.org/v2/projects/geyser/versions/{}/builds \ + | jq --raw-output '"\(.version).\(.builds | map(select(.channel == "default")) | .[-1].build)"' + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA inputs: name: k3s @@ -46,6 +67,13 @@ include: | sort -Vr \ | head -n 1 +- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA + inputs: + name: minecraft-server + command: | + curl -sSLf https://launchermeta.mojang.com/mc/game/version_manifest.json \ + | jq --raw-output '.latest.release' + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA inputs: name: nodejs-lts @@ -79,6 +107,16 @@ include: git clone --quiet https://github.com/FiloSottile/passage echo "$(git -C passage rev-list --count --all).$(git -C passage rev-parse --short HEAD)" +- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA + inputs: + name: papermc + command: | + curl --silent --show-error --location --fail "https://api.papermc.io/v2/projects/paper" \ + | jq --raw-output '.version_groups[-1]' \ + | xargs -I{} \ + curl --silent --show-error --location --fail "https://api.papermc.io/v2/projects/paper/version_group/{}/builds" \ + | jq --raw-output '.builds | map(select(.channel == "default")) | .[-1] | "\(.version)-\(.build)"' + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA inputs: name: python-3.12 @@ -113,3 +151,12 @@ include: --url "https://api.github.com/repos/rancher/rke2/releases/latest" \ | jq --raw-output '.tag_name' \ | sed -E 's/^v([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+rke2r([[:digit:]]+)$/\\1.\\2/' + +- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA + inputs: + name: velocity + command: | + curl --silent --show-error --location --fail \ + --url "https://api.github.com/repos/rancher/rke2/releases/latest" \ + | jq --raw-output '.tag_name' \ + | sed -E 's/^v([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+rke2r([[:digit:]]+)$/\\1.\\2/'