Skip to content

Commit 29f72f3

Browse files
authored
ci(canary): add two-step gateway start + sandbox create canary test (#325)
1 parent 498f6cf commit 29f72f3

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

.github/workflows/release-canary.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@ defaults:
2020
shell: bash
2121

2222
jobs:
23-
acceptance:
24-
name: Canary (${{ matrix.arch }})
23+
canary:
24+
name: Canary ${{ matrix.mode }} (${{ matrix.arch }})
2525
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
2626
strategy:
2727
fail-fast: false
2828
matrix:
29+
arch:
30+
- amd64
31+
- arm64
32+
mode:
33+
- auto-bootstrap
34+
- two-step
2935
include:
3036
- arch: amd64
3137
runner: build-amd64
@@ -45,6 +51,11 @@ jobs:
4551
- /var/run/docker.sock:/var/run/docker.sock
4652
env:
4753
OPENSHELL_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
# The CI container mounts the host Docker socket, so the gateway
55+
# container is a sibling — not reachable at 127.0.0.1 from inside
56+
# this container. OPENSHELL_GATEWAY_HOST tells the auto-bootstrap
57+
# to advertise a reachable address instead.
58+
OPENSHELL_GATEWAY_HOST: host.docker.internal
4859
steps:
4960
- uses: actions/checkout@v4
5061

@@ -90,12 +101,16 @@ jobs:
90101
echo "${BRIDGE_IP} host.docker.internal" >> /etc/hosts
91102
fi
92103
104+
# Two-step mode: explicitly start the gateway before creating a sandbox.
105+
# --gateway-host is required because the gateway container is a Docker
106+
# sibling (not in the same network namespace). Without it the metadata
107+
# stores 127.0.0.1 which is unreachable from this CI container.
93108
- name: Start gateway
94-
env:
95-
# Use OPENSHELL_GATEWAY_HOST when supported (CLI >= next release),
96-
# fall back to the explicit --gateway-host flag for older CLIs.
97-
OPENSHELL_GATEWAY_HOST: host.docker.internal
98-
run: openshell gateway start --gateway-host host.docker.internal
109+
if: matrix.mode == 'two-step'
110+
run: |
111+
set -euo pipefail
112+
echo "Starting gateway..."
113+
openshell gateway start --gateway-host "$OPENSHELL_GATEWAY_HOST"
99114
100115
- name: Run canary test
101116
run: |

0 commit comments

Comments
 (0)