Skip to content

Commit 94b2d89

Browse files
authored
FTBA installer on Alpine fails gracefully (#1655)
1 parent 72b6eeb commit 94b2d89

File tree

5 files changed

+69
-50
lines changed

5 files changed

+69
-50
lines changed

.github/workflows/build-multiarch.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ on:
1010
- "*.md"
1111
- "docs/**"
1212
- "examples/**"
13-
pull_request:
14-
branches: [ master ]
15-
types: [assigned, opened, synchronize, labeled]
16-
paths-ignore:
17-
- "*.md"
18-
- "docs/**"
19-
- "examples/**"
2013

2114
jobs:
2215
build:

.github/workflows/ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/verify-pr.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Test and Build multi-architecture
2+
on:
3+
pull_request:
4+
branches: [ master ]
5+
types: [assigned, opened, synchronize, labeled]
6+
paths-ignore:
7+
- "*.md"
8+
- "docs/**"
9+
- "examples/**"
10+
11+
jobs:
12+
build:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
variant:
17+
- java17
18+
- java17-alpine
19+
include:
20+
# JAVA 17:
21+
- variant: java17
22+
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
23+
baseImage: eclipse-temurin:17-jre-focal
24+
platforms: linux/amd64,linux/arm/v7,linux/arm64
25+
mcVersion: 1.18.2
26+
- variant: java17-alpine
27+
baseImage: eclipse-temurin:17-jre-alpine
28+
platforms: linux/amd64
29+
mcVersion: 1.18.2
30+
env:
31+
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
32+
runs-on: ubuntu-20.04
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
with:
37+
# for build-files step
38+
fetch-depth: 0
39+
40+
- name: Setup Docker Buildx
41+
uses: docker/setup-buildx-action@v2
42+
43+
- name: Build for test
44+
uses: docker/[email protected]
45+
with:
46+
platforms: linux/amd64
47+
tags: ${{ env.IMAGE_TO_TEST }}
48+
# ensure latest base image is used
49+
pull: true
50+
# load into daemon for test usage in next step
51+
load: true
52+
push: false
53+
build-args: |
54+
BASE_IMAGE=${{ matrix.baseImage }}
55+
cache-from: type=gha,scope=${{ matrix.variant }}
56+
57+
- name: Run tests
58+
env:
59+
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
60+
VARIANT: ${{ matrix.variant }}
61+
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
62+
run: |
63+
tests/test.sh

scripts/start-deployFTBA

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ ftbInstallMarker=".ftb-installed"
77
isDebugging && set -x
88
set -e
99

10+
if [[ $(getDistro) = alpine ]]; then
11+
log "ERROR: the FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
12+
exit 1
13+
fi
14+
1015
if ! [[ -v FTB_MODPACK_ID ]]; then
1116
log "ERROR FTB_MODPACK_ID is required with TYPE=FTB"
1217
exit 1

tests/setuponlytests/modrinth/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ services:
99
TYPE: FABRIC
1010
FABRIC_LAUNCHER: /servers/fake.jar
1111
CUSTOM_SERVER: /servers/fake.jar
12+
VERSION: 1.19.1
1213
MODRINTH_PROJECTS: fabric-api,cloth-config
1314
volumes:
1415
- ./data:/data

0 commit comments

Comments
 (0)