feat: extend main-server artifact consumers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user