Skip to content

Commit dd5eef6

Browse files
committed
chore: added more logs
1 parent d4895de commit dd5eef6

File tree

2 files changed

+53
-10
lines changed

2 files changed

+53
-10
lines changed

.github/workflows/build-iso.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ jobs:
133133
# Make build script executable
134134
chmod +x build-iso-docker.sh
135135
136-
# Run the Docker-based ISO build
137-
./build-iso-docker.sh $BUILD_ARGS
136+
# Run the Docker-based ISO build with verbose output
137+
set -o pipefail
138+
./build-iso-docker.sh $BUILD_ARGS 2>&1 | tee build-output.log
138139
env:
139140
DOCKER_BUILDKIT: 1
140141

@@ -242,6 +243,7 @@ jobs:
242243
name: build-logs-${{ env.VERSION }}
243244
path: |
244245
build.log
246+
build-output.log
245247
Stamus-Live-Build/build.log
246248
retention-days: 30
247249

build-iso-docker.sh

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,56 @@ docker run $DOCKER_FLAGS \
124124
echo '[DEBUG] Available scripts:' && ls -la *.sh
125125
126126
# Run the build with error handling
127-
if ! ./build-debian-live.sh $*; then
128-
echo '[ERROR] build-debian-live.sh failed'
129-
echo '[DEBUG] Checking for build logs:'
130-
find . -name '*.log' -exec echo 'Found log: {}' \; -exec tail -20 {} \;
131-
echo '[DEBUG] Checking chroot tmp status:'
132-
ls -la Stamus-Live-Build/chroot/tmp/ 2>/dev/null || echo 'chroot tmp directory not found'
133-
echo '[DEBUG] Checking available space:'
127+
echo '[DEBUG] About to start build-debian-live.sh with arguments: $*'
128+
echo '[DEBUG] Current directory:' && pwd
129+
echo '[DEBUG] Available scripts:' && ls -la *.sh
130+
echo '[DEBUG] Memory usage:' && free -h
131+
echo '[DEBUG] Process count:' && ps aux | wc -l
132+
133+
# Run the build with comprehensive error capture
134+
echo '[DEBUG] Starting build with 2-hour timeout'
135+
if ! timeout 7200 bash -c './build-debian-live.sh $* 2>&1 | tee build-detailed.log; exit \${PIPESTATUS[0]}'; then
136+
BUILD_EXIT=\$?
137+
echo '[ERROR] build-debian-live.sh failed with exit code: '\$BUILD_EXIT
138+
139+
# Check if it was a timeout
140+
if [ \$BUILD_EXIT -eq 124 ]; then
141+
echo '[ERROR] Build timed out after 2 hours'
142+
fi
143+
144+
echo '[DEBUG] Last 100 lines of detailed output:'
145+
tail -100 build-detailed.log 2>/dev/null || echo 'No detailed log available'
146+
147+
echo '[DEBUG] Checking for APT errors:'
148+
grep -i 'error\|failed\|dpkg.*error' build-detailed.log 2>/dev/null | tail -20 || echo 'No APT errors found in log'
149+
150+
echo '[DEBUG] Checking for space issues:'
151+
grep -i 'no space\|disk.*full\|cannot write' build-detailed.log 2>/dev/null | tail -10 || echo 'No space errors found in log'
152+
153+
echo '[DEBUG] Checking build.log in build directory:'
154+
if [ -f build.log ]; then
155+
echo 'Last 50 lines of build.log:'
156+
tail -50 build.log
157+
fi
158+
159+
echo '[DEBUG] Checking for build logs in Stamus-Live-Build:'
160+
find Stamus-Live-Build -name '*.log' -exec echo 'Found log: {}' \; -exec tail -20 {} \; 2>/dev/null || echo 'No additional logs found'
161+
162+
echo '[DEBUG] Current resource usage:'
134163
df -h
135-
exit 1
164+
free -h
165+
166+
echo '[DEBUG] Live-build specific checks:'
167+
if [ -d 'Stamus-Live-Build' ]; then
168+
echo 'Stamus-Live-Build directory contents:'
169+
ls -la Stamus-Live-Build/
170+
if [ -d 'Stamus-Live-Build/chroot' ]; then
171+
echo 'Chroot directory size:'
172+
du -sh Stamus-Live-Build/chroot/ 2>/dev/null || echo 'Cannot check chroot size'
173+
fi
174+
fi
175+
176+
exit \$BUILD_EXIT
136177
fi
137178
138179
# Copy ISO to output

0 commit comments

Comments
 (0)