Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
# so the DB-availability probe passes and the integration tests run for real.
EVOLITH_TRACKER_DB: "Host=localhost;Port=5432;Database=evolith_tracker;Username=evolith;Password=localdev"
ConnectionStrings__DefaultConnection: "Host=localhost;Port=5432;Database=evolith_tracker;Username=evolith;Password=localdev"
# TenantProjectionDbContext (DS-07) reads MasterDataDb; unset it defaults to
# localhost/user "postgres" and auth fails. Share the CI Postgres like local.
ConnectionStrings__MasterDataDb: "Host=localhost;Port=5432;Database=evolith_tracker;Username=evolith;Password=localdev"
DOTNET_NOLOGO: "true"
DOTNET_CLI_TELEMETRY_OPTOUT: "true"

Expand All @@ -69,10 +72,20 @@ jobs:
run: |
dotnet tool install --global dotnet-ef
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet ef database update \
--project Tracker.Infrastructure \
--startup-project Tracker.Presentation \
--configuration Release
# Two DbContexts exist (DS-07 added TenantProjectionDbContext for the
# MasterData tenant-projection schema). `database update` is ambiguous
# without --context. Pass --connection explicitly so both apply against
# the CI Postgres regardless of design-time config resolution (the
# TenantProjection context otherwise falls back to localhost/postgres).
CI_CONN="Host=localhost;Port=5432;Database=evolith_tracker;Username=evolith;Password=localdev"
for ctx in TrackerDbContext TenantProjectionDbContext; do
dotnet ef database update \
--context "$ctx" \
--connection "$CI_CONN" \
--project Tracker.Infrastructure \
--startup-project Tracker.Presentation \
--configuration Release
done

- name: Test
run: dotnet test Tracker.sln --no-build -c Release --logger "trx;LogFileName=test-results.trx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ spec:
secretKeyRef:
name: {{ include "evolith-tracker-api.fullname" . }}-db
key: ConnectionStrings__DefaultConnection
# MasterData/tenant-projection context (DS-07). Without this it defaults to
# localhost and the TenantProjectionMigrator crashloops. In-cluster (broker-less
# local) it shares the Tracker Postgres; a dedicated DB is a prod concern.
- name: ConnectionStrings__MasterDataDb
valueFrom:
secretKeyRef:
name: {{ include "evolith-tracker-api.fullname" . }}-db
key: ConnectionStrings__DefaultConnection
{{- if .Values.coreApi.existingSecretName }}
- name: CoreApi__ApiKey
valueFrom:
Expand Down
11 changes: 9 additions & 2 deletions product/infra/helm/evolith-tracker-api/values-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ replicaCount: 1

# Point at the local in-cluster upstreams. These default to unreachable stubs
# for a standalone Tracker deploy; the BFF still starts and /health is green.
# Point at the REAL Core services running in the evolith-local namespace (same kind
# cluster, cross-namespace via FQDN). The Core requires the API key (401 otherwise),
# supplied from a secret in this namespace.
coreApi:
baseUrl: http://evolith-core-api/api/v1
baseUrl: http://evolith-core-api-evolith-core-api.evolith-local.svc.cluster.local/api/v1
existingSecretName: tracker-core-auth
apiKeyKey: EVOLITH_API_KEY
agentRuntime:
baseUrl: http://evolith-agent-runtime/v1
baseUrl: http://evolith-runtime-evolith-agent-runtime.evolith-local.svc.cluster.local/v1
existingSecretName: tracker-runtime-auth
apiKeyKey: AGENT_RUNTIME_API_KEY

auth:
provider: dev-bypass
Expand Down
Loading