ci: fixture-backed integration workflow and guarded fleet E2E workflow (lmxopcua#757)
v2-ci / unit-tests (push) Has been cancelled
v2-ci / unit-tests (push) Has been cancelled
v2-integration.yml runs the Sql, Historian.SqlServer, Historian.QuestDb and OpcUaClient integration projects against throwaway SQL Server/PostgreSQL/QuestDB/opc-plc containers started by scripts/ci/integration-fixtures.sh, with a MIN_EXECUTED=440 floor. v2-e2e.yml is manual/weekly, probes the shared fleet and skips cleanly when unreachable. v2-ci.yml is functionally unchanged. Unverified on a hosted runner until first run. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# probe-e2e-fixtures.sh — reachability gate for the guarded v2-e2e workflow (#757).
|
||||
#
|
||||
# TCP-probes the shared fixture host's REQUIRED simulator ports. Prints `reachable=true|false` (and
|
||||
# appends it to $GITHUB_OUTPUT when set). Exit status is always 0: an unreachable fleet is an expected,
|
||||
# clean skip (the runner is off-VPN, the host is down), not a failure. Only the probe itself erring
|
||||
# (bad usage) exits non-zero.
|
||||
#
|
||||
# Env: E2E_FIXTURE_HOST (default 10.100.0.35)
|
||||
# E2E_REQUIRED_PORTS (default "5020 1102 50000" = Modbus, S7, opc-plc)
|
||||
# E2E_PROBE_TIMEOUT (seconds per port, default 5)
|
||||
set -uo pipefail
|
||||
host="${E2E_FIXTURE_HOST:-10.100.0.35}"
|
||||
ports="${E2E_REQUIRED_PORTS:-5020 1102 50000}"
|
||||
t="${E2E_PROBE_TIMEOUT:-5}"
|
||||
ok=true
|
||||
for p in $ports; do
|
||||
if timeout "$t" bash -c "exec 3<>/dev/tcp/$host/$p" 2>/dev/null; then
|
||||
echo "probe: $host:$p open"
|
||||
else
|
||||
echo "probe: $host:$p UNREACHABLE"; ok=false
|
||||
fi
|
||||
done
|
||||
echo "reachable=$ok"
|
||||
[ -n "${GITHUB_OUTPUT:-}" ] && echo "reachable=$ok" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user