Try to do this in another way
Some checks failed
ci/woodpecker/push/base-cont Pipeline was successful
ci/woodpecker/push/build/2 Pipeline failed
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/discord Pipeline was successful

This commit is contained in:
Ryan Voots 2024-12-04 11:55:35 -05:00
parent 32b96f3eae
commit 07068206f2
5 changed files with 54 additions and 51 deletions

13
.woodpecker/base-cont.yml Normal file
View file

@ -0,0 +1,13 @@
steps:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: gitea.simcop2387.info/simcop2387/papermc-base-os
registry: gitea.simcop2387.info
auto_tag: true
dockerfile: os-base/Dockerfile
tags:
- base-${CI_PIPELINE_NUMBER}
username: simcop2387
password:
from_secret: docker_token

View file

@ -1,3 +1,6 @@
depends_on:
- 'base-cont'
matrix: matrix:
MC_VERSION: MC_VERSION:
# - 1.19.3 # - 1.19.3
@ -6,10 +9,8 @@ matrix:
# - 1.20.2 # - 1.20.2
# - 1.20.4 # - 1.20.4
# - 1.20.6 # - 1.20.6
- 1.21
- 1.21.1 - 1.21.1
- 1.21.3 - 1.21.3
- 1.21.4
steps: steps:
build: build:
@ -29,16 +30,3 @@ steps:
- RCON_CLI_VER=1.6.4 - RCON_CLI_VER=1.6.4
- memory_size=3G - memory_size=3G
# - java_flags="-Dlog4j2.formatMsgNoLookups=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=mcflags.emc.gs -Dcom.mojang.eula.agree=true" # - java_flags="-Dlog4j2.formatMsgNoLookups=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=mcflags.emc.gs -Dcom.mojang.eula.agree=true"
discord notification:
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
message: >
{{#success build.status}}
build {{build.number}} succeeded. Good job.
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}

20
.woodpecker/discord.yml Normal file
View file

@ -0,0 +1,20 @@
depends_on:
- 'base-cont'
- 'build'
runs_on: ['success', 'failure']
steps:
discord notification:
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
message: >
{{#success build.status}}
build {{build.number}} succeeded. Good job.
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}

View file

@ -1,23 +1,7 @@
######################################################## ########################################################
############## We use a java base image ################ ############## We use a java base image ################
######################################################## ########################################################
FROM debian:sid AS build FROM gitea.simcop2387.info/simcop2387/papermc-base-os:latest AS build
# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_LISTCHANGES_FRONTEND=none
RUN ls -lah /etc/apt/sources.list.d/
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list.d/debian.sources
RUN apt update && apt install -y curl jq bash sudo wget gnupg2
RUN wget -O - https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list
RUN apt-get update && apt-get install -y java-21-amazon-corretto-jdk libxi6 libxtst6 libxrender1
LABEL Marc Tönsing <marc@marc.tv>
ARG version=1.20.6
######################################################## ########################################################
############## Download Paper with API ################# ############## Download Paper with API #################
@ -35,19 +19,7 @@ RUN java -Dpaperclip.patchonly=true -jar /opt/minecraft/paperclip.jar; exit 0
######################################################## ########################################################
############## Running environment ##################### ############## Running environment #####################
######################################################## ########################################################
FROM debian:sid AS runtime FROM gitea.simcop2387.info/simcop2387/papermc-base-os:latest AS runtime
# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_LISTCHANGES_FRONTEND=none
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list.d/debian.sources
RUN apt update && apt install -y curl jq bash sudo wget gnupg2
RUN wget -O - https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list
RUN apt-get update && apt-get install -y java-21-amazon-corretto-jdk libxi6 libxtst6 libxrender1
# Working directory # Working directory
WORKDIR /data WORKDIR /data
@ -84,12 +56,6 @@ RUN chmod +x /opt/minecraft/docker-entrypoint.sh
RUN addgroup --gid 9001 dockergroup RUN addgroup --gid 9001 dockergroup
RUN adduser --shell /bin/sh --uid 9001 --gid 9001 dockeruser RUN adduser --shell /bin/sh --uid 9001 --gid 9001 dockeruser
# Install gosu
#RUN set -eux; \
# apk update; \
# apk add --no-cache su-exec;
# Entrypoint # Entrypoint
ENTRYPOINT ["/opt/minecraft/docker-entrypoint.sh"] ENTRYPOINT ["/opt/minecraft/docker-entrypoint.sh"]

16
os-base/Dockerfile Executable file
View file

@ -0,0 +1,16 @@
########################################################
############## We use a java base image ################
########################################################
FROM debian:sid
# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV APT_LISTCHANGES_FRONTEND=none
RUN ls -lah /etc/apt/sources.list.d/
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list.d/debian.sources
RUN apt update && apt install -y curl jq bash sudo wget gnupg2
RUN wget -O - https://apt.corretto.aws/corretto.key | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list
RUN apt-get update && apt-get install -y java-21-amazon-corretto-jdk libxi6 libxtst6 libxrender1