Skip to content

Commit ffe5e33

Browse files
committed
ci(release): capture canary sandbox failures
1 parent ab3e357 commit ffe5e33

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/release-canary.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ jobs:
204204
OPENSHELL_SSH_GATEWAY_HOST=127.0.0.1
205205
OPENSHELL_SSH_GATEWAY_PORT=17670
206206
OPENSHELL_SSH_HANDSHAKE_SECRET="${secret}"
207+
OPENSHELL_SUPERVISOR_IMAGE=ghcr.io/nvidia/openshell/supervisor:latest
208+
OPENSHELL_SANDBOX_IMAGE=ghcr.io/nvidia/openshell-community/sandboxes/base:latest
207209
OPENSHELL_PROVISION_TIMEOUT=300
208210
)
209211
@@ -228,9 +230,17 @@ jobs:
228230
done
229231
as_canary openshell status
230232
233+
set +e
231234
output="$(as_canary openshell sandbox create --no-keep --no-tty -- echo "hello world" 2>&1)"
235+
sandbox_status=$?
236+
set -e
232237
printf "%s\n" "$output"
233238
239+
if [ "$sandbox_status" -ne 0 ]; then
240+
echo "::error::Canary failed: sandbox command exited with status ${sandbox_status}"
241+
exit "$sandbox_status"
242+
fi
243+
234244
if ! grep -q "hello world" <<< "$output"; then
235245
echo "::error::Canary failed: hello world not found in sandbox output"
236246
exit 1
@@ -385,6 +395,8 @@ jobs:
385395
OPENSHELL_SSH_GATEWAY_HOST=127.0.0.1
386396
OPENSHELL_SSH_GATEWAY_PORT=17670
387397
OPENSHELL_SSH_HANDSHAKE_SECRET="${secret}"
398+
OPENSHELL_SUPERVISOR_IMAGE=ghcr.io/nvidia/openshell/supervisor:latest
399+
OPENSHELL_SANDBOX_IMAGE=ghcr.io/nvidia/openshell-community/sandboxes/base:latest
388400
OPENSHELL_PROVISION_TIMEOUT=300
389401
)
390402
@@ -409,9 +421,17 @@ jobs:
409421
done
410422
as_canary openshell status
411423
424+
set +e
412425
output="$(as_canary openshell sandbox create --no-keep --no-tty -- echo "hello world" 2>&1)"
426+
sandbox_status=$?
427+
set -e
413428
printf "%s\n" "$output"
414429
430+
if [ "$sandbox_status" -ne 0 ]; then
431+
echo "::error::Canary failed: sandbox command exited with status ${sandbox_status}"
432+
exit "$sandbox_status"
433+
fi
434+
415435
if ! grep -q "hello world" <<< "$output"; then
416436
echo "::error::Canary failed: hello world not found in sandbox output"
417437
exit 1
@@ -497,9 +517,17 @@ jobs:
497517
done
498518
openshell status
499519
520+
set +e
500521
output="$(OPENSHELL_PROVISION_TIMEOUT=300 openshell sandbox create --no-keep --no-tty -- echo "hello world" 2>&1)"
522+
sandbox_status=$?
523+
set -e
501524
printf "%s\n" "$output"
502525
526+
if [ "$sandbox_status" -ne 0 ]; then
527+
echo "::error::Canary failed: sandbox command exited with status ${sandbox_status}"
528+
exit "$sandbox_status"
529+
fi
530+
503531
if ! grep -q "hello world" <<< "$output"; then
504532
echo "::error::Canary failed: hello world not found in sandbox output"
505533
exit 1

0 commit comments

Comments
 (0)