fix: retry all repo clones + fail loudly on missing pom/package.json (emulator clone was silently empty)
This commit is contained in:
1 parent
acdbcdf36e
commit
c4a0c607bf
1 file changed
+35
-10
+35
-10
@@ -107,10 +107,14 @@ jobs:
|
|||||||
S="$CACHE_DIR/catalogus"; mkdir -p "$S"
|
S="$CACHE_DIR/catalogus"; mkdir -p "$S"
|
||||||
if [ "${{ steps.check.outputs.cat_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
if [ "${{ steps.check.outputs.cat_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
||||||
rm -rf "$WORK/src/catalogus"
|
rm -rf "$WORK/src/catalogus"
|
||||||
git clone --depth 1 --filter=blob:none --sparse \
|
for attempt in 1 2 3; do
|
||||||
https://gitlab.epicnabbo.nl/remco/Epicnabbo-Catalogus-Updated-Daily.git "$WORK/src/catalogus" 2>/dev/null \
|
if git clone --depth 1 --filter=blob:none --sparse \
|
||||||
|| git -C "$WORK/src/catalogus" pull --ff-only 2>/dev/null
|
https://gitlab.epicnabbo.nl/remco/Epicnabbo-Catalogus-Updated-Daily.git "$WORK/src/catalogus" 2>/dev/null; then
|
||||||
# Keep only what the pack actually needs (adjust paths as required).
|
break
|
||||||
|
fi
|
||||||
|
echo "Catalogus clone attempt $attempt failed, retrying..." >&2
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
git -C "$WORK/src/catalogus" sparse-checkout set . 2>/dev/null || true
|
git -C "$WORK/src/catalogus" sparse-checkout set . 2>/dev/null || true
|
||||||
echo "${{ steps.check.outputs.cat_ref }}" > "$S/ref"
|
echo "${{ steps.check.outputs.cat_ref }}" > "$S/ref"
|
||||||
rm -rf "$S/snapshot"; cp -r "$WORK/src/catalogus" "$S/snapshot"
|
rm -rf "$S/snapshot"; cp -r "$WORK/src/catalogus" "$S/snapshot"
|
||||||
@@ -128,8 +132,15 @@ jobs:
|
|||||||
# Nitro-V3's vite.config expects the renderer at ../Nitro_Render_V3
|
# Nitro-V3's vite.config expects the renderer at ../Nitro_Render_V3
|
||||||
RENDER_DIR="$WORK/src/Nitro_Render_V3"
|
RENDER_DIR="$WORK/src/Nitro_Render_V3"
|
||||||
if [ "${{ steps.check.outputs.render_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
if [ "${{ steps.check.outputs.render_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
||||||
git clone --depth 1 https://github.com/duckietm/Nitro_Render_V3.git "$RENDER_DIR" 2>/dev/null \
|
rm -rf "$RENDER_DIR"
|
||||||
|| git -C "$RENDER_DIR" pull --ff-only 2>/dev/null
|
for attempt in 1 2 3; do
|
||||||
|
if git clone --depth 1 https://github.com/duckietm/Nitro_Render_V3.git "$RENDER_DIR" 2>/dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Render clone attempt $attempt failed, retrying..." >&2
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
[ -f "$RENDER_DIR/package.json" ] || { echo "Render clone failed"; exit 1; }
|
||||||
cd "$RENDER_DIR"
|
cd "$RENDER_DIR"
|
||||||
yarn install --frozen-lockfile --prefer-offline 2>&1 || yarn install 2>&1
|
yarn install --frozen-lockfile --prefer-offline 2>&1 || yarn install 2>&1
|
||||||
rm -rf "$S/files"; mkdir -p "$S/files"; cp -r . "$S/files/" 2>/dev/null || true
|
rm -rf "$S/files"; mkdir -p "$S/files"; cp -r . "$S/files/" 2>/dev/null || true
|
||||||
@@ -148,8 +159,15 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
S="$CACHE_DIR/nitro"; mkdir -p "$S"
|
S="$CACHE_DIR/nitro"; mkdir -p "$S"
|
||||||
if [ "${{ steps.check.outputs.nitro_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
if [ "${{ steps.check.outputs.nitro_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
||||||
git clone --depth 1 https://github.com/duckietm/Nitro-V3.git "$WORK/src/nitro" 2>/dev/null \
|
rm -rf "$WORK/src/nitro"
|
||||||
|| git -C "$WORK/src/nitro" pull --ff-only 2>/dev/null
|
for attempt in 1 2 3; do
|
||||||
|
if git clone --depth 1 https://github.com/duckietm/Nitro-V3.git "$WORK/src/nitro" 2>/dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Nitro clone attempt $attempt failed, retrying..." >&2
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
[ -f "$WORK/src/nitro/package.json" ] || { echo "Nitro clone failed"; exit 1; }
|
||||||
cd "$WORK/src/nitro"
|
cd "$WORK/src/nitro"
|
||||||
yarn install --frozen-lockfile --prefer-offline 2>&1 || yarn install 2>&1
|
yarn install --frozen-lockfile --prefer-offline 2>&1 || yarn install 2>&1
|
||||||
yarn build
|
yarn build
|
||||||
@@ -167,8 +185,15 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
S="$CACHE_DIR/emulator"; mkdir -p "$S"
|
S="$CACHE_DIR/emulator"; mkdir -p "$S"
|
||||||
if [ "${{ steps.check.outputs.emu_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
if [ "${{ steps.check.outputs.emu_ref }}" != "$(cat "$S/ref" 2>/dev/null)" ]; then
|
||||||
git clone --depth 1 https://github.com/duckietm/Polaris-Emulator.git "$WORK/src/emulator" 2>/dev/null \
|
rm -rf "$WORK/src/emulator"
|
||||||
|| git -C "$WORK/src/emulator" pull --ff-only 2>/dev/null
|
for attempt in 1 2 3; do
|
||||||
|
if git clone --depth 1 https://github.com/duckietm/Polaris-Emulator.git "$WORK/src/emulator" 2>/dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Emulator clone attempt $attempt failed, retrying..." >&2
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
[ -f "$WORK/src/emulator/pom.xml" ] || { echo "Emulator clone failed (no pom.xml)"; exit 1; }
|
||||||
cd "$WORK/src/emulator"
|
cd "$WORK/src/emulator"
|
||||||
mvn package -q -T 1C -o -Dmaven.test.skip=true 2>&1 \
|
mvn package -q -T 1C -o -Dmaven.test.skip=true 2>&1 \
|
||||||
|| mvn package -q -T 1C -Dmaven.test.skip=true 2>&1
|
|| mvn package -q -T 1C -Dmaven.test.skip=true 2>&1
|
||||||
|
|||||||
Reference in new issue
Block a user