pipeline
Some checks failed
Build-und-Deploy / build (push) Failing after 1m7s

This commit is contained in:
nilzbu
2025-08-09 16:09:39 +02:00
parent 64abe911ee
commit bbf3e4a20e

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Node 20 + Git werden für Actions (checkout) benötigt
# Node 20 + Git für Node-basierte Actions (checkout) und Vaadin
- name: 🧰 Node 20 & Git installieren
run: |
apt-get update
@@ -18,6 +18,10 @@ jobs:
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
node -v && npm -v && git --version
# pnpm via Corepack (für Vaadin-Frontend-Build)
corepack enable
corepack prepare pnpm@latest --activate
pnpm -v
- name: 📥 Repository auschecken
uses: actions/checkout@v4
@@ -35,7 +39,7 @@ jobs:
echo "org.gradle.java.installations.auto-download=false"
} > ~/.gradle/gradle.properties
# Kurze Diagnose hilfreich, falls noch etwas hakt
# Diagnose: zeigt Java/Gradle-Setup im Job-Container
- name: 🔎 Java/Gradle-Info
run: |
set -x
@@ -44,21 +48,29 @@ jobs:
./gradlew -q javaToolchains || true
- name: 🛠 Baue das Projekt (ohne Tests)
env:
# Vaadin im CI stabiler (kein Interaktivkram)
CI: "true"
run: |
./gradlew clean build -x test --no-daemon --info
echo "Build-Output:"
set -euo pipefail
chmod +x ./gradlew || true
./gradlew clean build -x test --no-daemon --info --stacktrace
echo "Build-Output (build/libs):"
ls -l build/libs || true
- name: 📦 JAR ins Shared Volume kopieren und archivieren
run: |
set -euo pipefail
JAR="build/libs/MyTimeTracker-0.0.1-SNAPSHOT.jar"
test -f "$JAR" || { echo "❌ JAR wurde nicht erzeugt: $JAR"; exit 1; }
# Falls der JAR-Name abweicht, hier ggf. anpassen/vereinheitlichen:
JAR="$(ls -1 build/libs/*-SNAPSHOT.jar 2>/dev/null | head -n1)"
if [ -z "${JAR:-}" ] || [ ! -f "$JAR" ]; then
echo "❌ Kein JAR gefunden in build/libs/*-SNAPSHOT.jar"; exit 1
fi
mkdir -p /shared_jar_data /shared_jar_data/archive
timestamp=$(date +"%Y%m%d-%H%M%S")
# Aktuelle Version bereitstellen
# Aktuelle Version
cp "$JAR" /shared_jar_data/MyTimeTracker-0.0.1-SNAPSHOT.jar
# Archivkopie
cp "$JAR" "/shared_jar_data/archive/MyTimeTracker-$timestamp.jar"