@@ -96,67 +96,20 @@ jobs:
9696 role-session-name : Github-e2e-Rollout
9797 role-duration-seconds : 3600
9898
99- # --- n2c: expose a node socket via Demeter dmtrcli ----------------------
100- # PLACEHOLDER: the exact dmtrcli auth/port-forward invocation must be
101- # confirmed against the real CLI. These legs are continue-on-error.
99+ # n2c reaches a Demeter-managed node socket via a dmtrcli port-forward.
102100 - name : Set up dmtrcli node socket (n2c)
103101 if : matrix.kind == 'n2c'
104102 env :
105103 DMTR_API_KEY : ${{ secrets.DMTR_API_KEY }}
106- run : |
107- set -euo pipefail
108- curl -fsSL https://raw.githubusercontent.com/demeter-run/cli/main/install.sh | sh
109- mkdir -p "${RUNNER_TEMP}/sockets"
110- dmtrcli auth login --api-key "${DMTR_API_KEY}"
111- # Forward the managed Cardano node's n2c socket onto the runner host.
112- dmtrcli ports tunnel \
113- --unix-socket "${RUNNER_TEMP}/sockets/node0.socket" &
114- echo "DMTR_TUNNEL_PID=$!" >> "$GITHUB_ENV"
115- # Wait for the socket to appear before starting oura.
116- for i in $(seq 1 30); do
117- if [ -S "${RUNNER_TEMP}/sockets/node0.socket" ]; then break; fi
118- sleep 2
119- done
104+ run : .github/e2e/scripts/setup-dmtr-socket.sh
120105
121- # --- run the test --------------------------------------------------------
122106 - name : Run ${{ matrix.name }}
123107 env :
124108 TEST_NAME : ${{ matrix.name }}
125109 GITHUB_RUN_NUMBER : ${{ github.run_number }}
126110 KIND : ${{ matrix.kind }}
127- run : |
128- set -euo pipefail
129-
130- # Resolve placeholders (e.g. the s3 prefix) into the final config.
131- envsubst < ".github/e2e/configs/${TEST_NAME}.toml" > "${RUNNER_TEMP}/daemon.toml"
132- echo "----- resolved daemon.toml -----"
133- cat "${RUNNER_TEMP}/daemon.toml"
134- echo "--------------------------------"
135-
136- docker_args=(
137- --rm
138- -e RUST_LOG=warn
139- -v "${RUNNER_TEMP}/daemon.toml:/etc/oura/daemon.toml:ro"
140- )
141-
142- if [ "$KIND" = "aws" ]; then
143- docker_args+=(
144- -e AWS_ACCESS_KEY_ID
145- -e AWS_SECRET_ACCESS_KEY
146- -e AWS_SESSION_TOKEN
147- -e AWS_REGION
148- -e AWS_DEFAULT_REGION
149- )
150- fi
151-
152- if [ "$KIND" = "n2c" ]; then
153- docker_args+=( -v "${RUNNER_TEMP}/sockets:/opt/cardano/cnode/sockets" )
154- fi
155-
156- # oura self-terminates via [source.finalize]; the Assert sink panics on a
157- # bad block (non-zero exit). `timeout` guards against a hang (exit 124).
158- timeout 1800 docker run "${docker_args[@]}" "$TARGET_IMAGE" daemon
111+ run : .github/e2e/scripts/run-test.sh
159112
160113 - name : Stop dmtrcli tunnel (n2c)
161114 if : always() && matrix.kind == 'n2c'
162- run : kill "${DMTR_TUNNEL_PID}" 2>/dev/null || true
115+ run : .github/e2e/scripts/stop-dmtr-tunnel.sh
0 commit comments