f765f3e74b
gitea/burnin-dummy/build.sh: bash equivalent of build.ps1 (sleep 30, writes dist/build-info.txt). Needed because powershell is not present on LinuxBuild2404 template. scripts/Start-BurnInTest-Linux.ps1: burn-in wrapper for LinuxBuild2404 template (SnapshotName=BaseClean-Linux, GuestOS=Linux, BuildCommand='bash build.sh'). Mirrors Start-BurnInTest.ps1.
24 lines
684 B
Bash
24 lines
684 B
Bash
#!/usr/bin/env bash
|
|
# Fake build script per il repo burnin-dummy — variante Linux.
|
|
# Simula un build reale: attende ~30s, poi scrive dist/build-info.txt.
|
|
# Invoke-RemoteBuild impacchetta /opt/ci/build/<repo>/dist come artifacts.zip.
|
|
# Committare questo file come build.sh nella root del repo burnin-dummy.
|
|
set -euo pipefail
|
|
|
|
DIST_DIR="$(dirname "$0")/dist"
|
|
mkdir -p "$DIST_DIR"
|
|
|
|
# Simula lavoro di build (~30 s).
|
|
echo '[build.sh] Simulating build work (~30s)...'
|
|
sleep 30
|
|
|
|
# Scrive un artifact marker con metadati del run.
|
|
cat > "$DIST_DIR/build-info.txt" <<EOF
|
|
build-ok
|
|
date=$(date '+%Y-%m-%d %H:%M:%S')
|
|
host=$(hostname)
|
|
pid=$$
|
|
EOF
|
|
|
|
echo "[build.sh] Artifact written to $DIST_DIR"
|