work
This commit is contained in:
32
ops/devops/ci-110-runner/README.md
Normal file
32
ops/devops/ci-110-runner/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
CI runner for **DEVOPS-CI-110-001** (Concelier + Excititor smoke)
|
||||
==================================================================
|
||||
|
||||
Scope
|
||||
-----
|
||||
- Warm NuGet cache from `local-nugets`, `.nuget/packages`, and (optionally) NuGet.org.
|
||||
- Ensure OpenSSL 1.1 is present (installs `libssl1.1` when available via `apt-get`).
|
||||
- Run lightweight slices:
|
||||
- Concelier WebService: `HealthAndReadyEndpointsRespond`
|
||||
- Excititor WebService: `AirgapImportEndpointTests*`
|
||||
- Emit TRX + logs to `ops/devops/artifacts/ci-110/<timestamp>/`.
|
||||
|
||||
Usage
|
||||
-----
|
||||
```bash
|
||||
export NUGET_SOURCES="/mnt/e/dev/git.stella-ops.org/local-nugets;/mnt/e/dev/git.stella-ops.org/.nuget/packages;https://api.nuget.org/v3/index.json"
|
||||
export TIMESTAMP=$(date -u +%Y%m%dT%H%M%SZ) # optional, for reproducible paths
|
||||
bash ops/devops/ci-110-runner/run-ci-110.sh
|
||||
```
|
||||
|
||||
Artifacts
|
||||
---------
|
||||
- TRX: `ops/devops/artifacts/ci-110/<timestamp>/trx/`
|
||||
- `concelier-health.trx` (1 test)
|
||||
- `excititor-airgapimport.fqn.trx` (2 tests)
|
||||
- Logs + restores under `ops/devops/artifacts/ci-110/<timestamp>/logs/`.
|
||||
|
||||
Notes
|
||||
-----
|
||||
- The runner uses `--no-build` on test slices; prior restores are included in the script.
|
||||
- If OpenSSL 1.1 is not present and `apt-get` cannot install `libssl1.1`, set `LD_LIBRARY_PATH` to a pre-installed OpenSSL 1.1 location before running.
|
||||
- Extend the runner by adding more `run_test_slice` calls for additional suites; keep filters tight to avoid long hangs on constrained CI.
|
||||
92
ops/devops/ci-110-runner/run-ci-110.sh
Normal file
92
ops/devops/ci-110-runner/run-ci-110.sh
Normal file
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# CI helper for DEVOPS-CI-110-001
|
||||
# - Warms NuGet cache from local sources
|
||||
# - Ensures OpenSSL 1.1 compatibility if available
|
||||
# - Runs targeted Concelier and Excititor test slices with TRX output
|
||||
# - Writes artefacts under ops/devops/artifacts/ci-110/<timestamp>/
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="${ROOT:-$(git rev-parse --show-toplevel)}"
|
||||
TIMESTAMP="${TIMESTAMP:-$(date -u +%Y%m%dT%H%M%SZ)}"
|
||||
ARTIFACT_ROOT="${ARTIFACT_ROOT:-"$ROOT/ops/devops/artifacts/ci-110/$TIMESTAMP"}"
|
||||
LOG_DIR="$ARTIFACT_ROOT/logs"
|
||||
TRX_DIR="$ARTIFACT_ROOT/trx"
|
||||
|
||||
NUGET_SOURCES_DEFAULT="$ROOT/local-nugets;$ROOT/.nuget/packages;https://api.nuget.org/v3/index.json"
|
||||
NUGET_SOURCES="${NUGET_SOURCES:-$NUGET_SOURCES_DEFAULT}"
|
||||
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_RESTORE_DISABLE_PARALLEL="${DOTNET_RESTORE_DISABLE_PARALLEL:-1}"
|
||||
|
||||
mkdir -p "$LOG_DIR" "$TRX_DIR"
|
||||
|
||||
log() {
|
||||
printf '[%s] %s\n' "$(date -u +%H:%M:%S)" "$*"
|
||||
}
|
||||
|
||||
ensure_openssl11() {
|
||||
if openssl version 2>/dev/null | grep -q "1\\.1."; then
|
||||
log "OpenSSL 1.1 detected: $(openssl version)"
|
||||
return
|
||||
fi
|
||||
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
log "OpenSSL 1.1 not found; attempting install via apt-get (libssl1.1)"
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y >/dev/null || true
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libssl1.1 || true
|
||||
if openssl version 2>/dev/null | grep -q "1\\.1."; then
|
||||
log "OpenSSL 1.1 available after install: $(openssl version)"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
log "OpenSSL 1.1 still unavailable. Provide it via LD_LIBRARY_PATH if required."
|
||||
}
|
||||
|
||||
restore_solution() {
|
||||
local sln="$1"
|
||||
log "Restore $sln"
|
||||
dotnet restore "$sln" --source "$NUGET_SOURCES" --verbosity minimal | tee "$LOG_DIR/restore-$(basename "$sln").log"
|
||||
}
|
||||
|
||||
run_test_slice() {
|
||||
local proj="$1"
|
||||
local filter="$2"
|
||||
local name="$3"
|
||||
log "Test $name ($proj, filter='$filter')"
|
||||
dotnet test "$proj" \
|
||||
-c Debug \
|
||||
--no-build \
|
||||
${filter:+--filter "$filter"} \
|
||||
--logger "trx;LogFileName=${name}.trx" \
|
||||
--results-directory "$TRX_DIR" \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 8m \
|
||||
--blame-hang-dump-type none \
|
||||
| tee "$LOG_DIR/test-${name}.log"
|
||||
}
|
||||
|
||||
main() {
|
||||
log "Starting CI-110 runner; artefacts -> $ARTIFACT_ROOT"
|
||||
ensure_openssl11
|
||||
|
||||
restore_solution "$ROOT/concelier-webservice.slnf"
|
||||
restore_solution "$ROOT/src/Excititor/StellaOps.Excititor.sln"
|
||||
|
||||
# Concelier: lightweight health slice to validate runner + Mongo wiring
|
||||
run_test_slice "$ROOT/src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests/StellaOps.Concelier.WebService.Tests.csproj" \
|
||||
"HealthAndReadyEndpointsRespond" \
|
||||
"concelier-health"
|
||||
|
||||
# Excititor: airgap import surface (chunk-path) smoke
|
||||
run_test_slice "$ROOT/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/StellaOps.Excititor.WebService.Tests.csproj" \
|
||||
"FullyQualifiedName~AirgapImportEndpointTests" \
|
||||
"excititor-airgapimport"
|
||||
|
||||
log "Done. TRX files in $TRX_DIR"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user