From 7f9f600651e7a13146eb67c13d2ee287812f205e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 5 Aug 2022 21:22:26 -0500 Subject: [PATCH 1/4] FTBA installer on Alpine fails gracefully --- scripts/start-deployFTBA | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/start-deployFTBA b/scripts/start-deployFTBA index 8f145bfab41..0746cb19157 100755 --- a/scripts/start-deployFTBA +++ b/scripts/start-deployFTBA @@ -7,6 +7,11 @@ ftbInstallMarker=".ftb-installed" isDebugging && set -x set -e +if [[ $(getDistro) = alpine ]]; then + log "ERROR: the FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead." + exit 1 +fi + if ! [[ -v FTB_MODPACK_ID ]]; then log "ERROR FTB_MODPACK_ID is required with TYPE=FTB" exit 1 From 566b8503344264aa134a727919c3678423da2071 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 5 Aug 2022 21:33:01 -0500 Subject: [PATCH 2/4] Trimmed down PR build --- .github/workflows/ci.yml | 43 ---------------------- .github/workflows/verify-pr.yml | 63 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/verify-pr.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 91a30beb6a2..00000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: ContinuousIntegration - -on: - push: - branches: - - 'dev*' - - '!master' - - '!java*' - - '!multi*' - paths-ignore: - - "*.md" - - "docs/**" - - "examples/**" - -env: - IMAGE_TO_TEST: ${{ secrets.IMAGE_ORG }}/minecraft-server:test-${{ github.repository_owner }}-${{ github.run_id }} - MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }} - -jobs: - test: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build - uses: docker/build-push-action@v3.1.0 - with: - context: . - platforms: linux/amd64 - tags: ${{ env.IMAGE_TO_TEST }} - load: true - cache-from: type=gha - - - name: Run Setup Only Tests - run: bash tests/setuponlytests/test.sh - - # - name: Run Full Minecraft Service Tests - # run: | - # tests/fulltests/test.sh diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml new file mode 100644 index 00000000000..7a66e030a6b --- /dev/null +++ b/.github/workflows/verify-pr.yml @@ -0,0 +1,63 @@ +name: Test and Build multi-architecture +on: + pull_request: + branches: [ master ] + types: [assigned, opened, synchronize, labeled] + paths-ignore: + - "*.md" + - "docs/**" + - "examples/**" + +jobs: + build: + strategy: + fail-fast: false + matrix: + variant: + - java17 + - java17-alpine + include: + # JAVA 17: + - variant: java17 + # jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343 + baseImage: eclipse-temurin:17-jre-focal + platforms: linux/amd64,linux/arm/v7,linux/arm64 + mcVersion: 1.18.2 + - variant: java17-alpine + baseImage: eclipse-temurin:17-jre-alpine + platforms: linux/amd64 + mcVersion: 1.18.2 + env: + IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }} + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # for build-files step + fetch-depth: 0 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build for test + uses: docker/build-push-action@v3.1.0 + with: + platforms: linux/amd64 + tags: ${{ env.IMAGE_TO_TEST }} + # ensure latest base image is used + pull: true + # load into daemon for test usage in next step + load: true + push: false + build-args: | + BASE_IMAGE=${{ matrix.baseImage }} + cache-from: type=gha,scope=${{ matrix.variant }} + + - name: Run tests + env: + MINECRAFT_VERSION: ${{ matrix.mcVersion }} + VARIANT: ${{ matrix.variant }} + MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }} + run: | + tests/test.sh From 96e84afa247285a7d8f7d7756fb377cdf34beee4 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 5 Aug 2022 21:33:17 -0500 Subject: [PATCH 3/4] Pinned Modrinth test VERSION --- tests/setuponlytests/modrinth/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/setuponlytests/modrinth/docker-compose.yml b/tests/setuponlytests/modrinth/docker-compose.yml index 394538dd960..25bc3774980 100644 --- a/tests/setuponlytests/modrinth/docker-compose.yml +++ b/tests/setuponlytests/modrinth/docker-compose.yml @@ -9,6 +9,7 @@ services: TYPE: FABRIC FABRIC_LAUNCHER: /servers/fake.jar CUSTOM_SERVER: /servers/fake.jar + VERSION: 1.19.1 MODRINTH_PROJECTS: fabric-api,cloth-config volumes: - ./data:/data From 75b311d8f02056ff20bb0e44b1daaf74dfd9ccea Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 5 Aug 2022 21:34:20 -0500 Subject: [PATCH 4/4] Remove pull request build trigger --- .github/workflows/build-multiarch.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 4f681e6fa63..02d53a57745 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -10,13 +10,6 @@ on: - "*.md" - "docs/**" - "examples/**" - pull_request: - branches: [ master ] - types: [assigned, opened, synchronize, labeled] - paths-ignore: - - "*.md" - - "docs/**" - - "examples/**" jobs: build: