Also add discord notification
This commit is contained in:
parent
257f0155ac
commit
32b96f3eae
3 changed files with 31 additions and 0 deletions
|
@ -29,3 +29,16 @@ 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}}
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
############## We use a java base image ################
|
############## We use a java base image ################
|
||||||
########################################################
|
########################################################
|
||||||
FROM debian:sid AS build
|
FROM debian:sid 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 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 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 apt update && apt install -y curl jq bash sudo wget gnupg2
|
||||||
|
@ -32,6 +36,10 @@ RUN java -Dpaperclip.patchonly=true -jar /opt/minecraft/paperclip.jar; exit 0
|
||||||
############## Running environment #####################
|
############## Running environment #####################
|
||||||
########################################################
|
########################################################
|
||||||
FROM debian:sid AS runtime
|
FROM debian:sid 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 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 apt update && apt install -y curl jq bash sudo wget gnupg2
|
||||||
|
|
||||||
|
|
10
discord-notify.sh
Executable file
10
discord-notify.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Message to send
|
||||||
|
MESSAGE="A build of the Docker container has finished."
|
||||||
|
|
||||||
|
# Send the message using curl
|
||||||
|
curl -X POST $WEBHOOK_URL \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"content\": \"$MESSAGE\"}"
|
Loading…
Add table
Reference in a new issue