bfd8b25108
- DeploymentManagerActor.HandleDeployArtifacts read the Self property inside its Task.Run lambda (line dispatching ApplyArtifactDataConnectionsToDcl). Self is backed by the ambient ActorCell, null on a thread-pool thread, so it threw 'no active ActorContext' — surfaced the first time a data connection is deployed via deploy-artifacts. Capture Self into a local first (as Sender already was). - seed-sites.sh: create a shared MxGateway data connection (10.100.0.48:5120) on each site and deploy artifacts so the DCL establishes them. - build.sh: nounset-safe empty-array expansion (bash 3.2).
35 lines
1.2 KiB
Bash
Executable File
35 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
echo "=== ScadaBridge Docker Build ==="
|
|
|
|
# Ensure the shared network exists
|
|
if ! docker network inspect scadabridge-net >/dev/null 2>&1; then
|
|
echo "Creating scadabridge-net network..."
|
|
docker network create scadabridge-net
|
|
fi
|
|
|
|
# Optional credentials for the private Gitea NuGet feed (ZB.MOM.WW.MxGateway.*).
|
|
# Read from the host environment so secrets are never committed. Leave unset for an
|
|
# anonymous feed. Export MXGW_NUGET_USER / MXGW_NUGET_PASS before running deploy.
|
|
NUGET_ARGS=()
|
|
if [ -n "${MXGW_NUGET_USER:-}" ]; then
|
|
NUGET_ARGS+=(--build-arg "NUGET_GITEA_USER=${MXGW_NUGET_USER}")
|
|
NUGET_ARGS+=(--build-arg "NUGET_GITEA_PASS=${MXGW_NUGET_PASS:-}")
|
|
fi
|
|
|
|
# Build from repo root (so COPY paths in Dockerfile resolve correctly)
|
|
echo "Building scadabridge:latest image..."
|
|
# Note: ${NUGET_ARGS[@]+...} guards against the "unbound variable" error that
|
|
# set -u raises on bash 3.2 (macOS default) when expanding an empty array.
|
|
docker build \
|
|
-t scadabridge:latest \
|
|
-f "$SCRIPT_DIR/Dockerfile" \
|
|
${NUGET_ARGS[@]+"${NUGET_ARGS[@]}"} \
|
|
"$REPO_ROOT"
|
|
|
|
echo "Build complete: scadabridge:latest"
|