feat: extend main-server artifact consumers

This commit is contained in:
Codex
2026-05-20 01:07:52 +00:00
parent b28f693fda
commit 93d9488d36
17 changed files with 519 additions and 34 deletions
@@ -16,6 +16,11 @@ interface RuntimeConfig {
pipelineBridgeBaseUrl: string;
pipelineBridgeIntervalMs: number;
pipelineBridgeRunLimit: number;
deployServiceId: string;
deployRef: string;
deployRepo: string;
deployCommit: string;
deployRequestedCommit: string;
}
interface OaEventInput {
@@ -184,6 +189,11 @@ function configFromEnv(): RuntimeConfig {
pipelineBridgeBaseUrl: envString("PIPELINE_OA_BRIDGE_BASE_URL", "").replace(/\/+$/u, ""),
pipelineBridgeIntervalMs: envNumber("PIPELINE_OA_BRIDGE_INTERVAL_MS", 15_000),
pipelineBridgeRunLimit: envNumber("PIPELINE_OA_BRIDGE_RUN_LIMIT", 50),
deployServiceId: envString("UNIDESK_DEPLOY_SERVICE_ID", "oa-event-flow"),
deployRef: envString("UNIDESK_DEPLOY_REF", ""),
deployRepo: envString("UNIDESK_DEPLOY_REPO", ""),
deployCommit: envString("UNIDESK_DEPLOY_COMMIT", ""),
deployRequestedCommit: envString("UNIDESK_DEPLOY_REQUESTED_COMMIT", ""),
};
}
@@ -1328,6 +1338,13 @@ async function healthRoute(): Promise<Response> {
insertedCount: pipelineBridgeState.insertedCount,
duplicateCount: pipelineBridgeState.duplicateCount,
},
deploy: {
serviceId: config.deployServiceId,
ref: config.deployRef,
repo: config.deployRepo,
commit: config.deployCommit,
requestedCommit: config.deployRequestedCommit,
},
}, databaseReady ? 200 : 503);
}