fix: support local D601 artifact deploy provider

This commit is contained in:
AgentRun Artificer
2026-06-11 17:53:53 +08:00
parent fc3a095858
commit 3ca82e9946
4 changed files with 64 additions and 2 deletions
+6 -1
View File
@@ -40,6 +40,7 @@ interface DeployOptions {
environment: DeployEnvironment | null;
serviceId: string | null;
commitOverride: string | null;
providerId: string;
runNow: boolean;
dryRun: boolean;
force: boolean;
@@ -221,7 +222,7 @@ export function deployHelp(action: string | undefined = undefined): Record<strin
usage: {
check: "bun scripts/cli.ts deploy check [--file deploy.json | --env dev|prod] [--service id]",
plan: "bun scripts/cli.ts deploy plan [--file deploy.json | --env dev|prod] [--service id]",
apply: "bun scripts/cli.ts deploy apply [--file deploy.json | --env dev|prod] [--service id] [--commit full-sha] [--dry-run] [--force] [--timeout-ms N] [--run-now]",
apply: "bun scripts/cli.ts deploy apply [--file deploy.json | --env dev|prod] [--service id] [--commit full-sha] [--dry-run] [--force] [--timeout-ms N] [--provider-id D601|local] [--run-now]",
guard: "bun scripts/cli.ts deploy guard code-queue-source [--root /home/ubuntu/cq-deploy]",
},
actions: {
@@ -244,6 +245,7 @@ export function deployHelp(action: string | undefined = undefined): Record<strin
{ name: "--dry-run", description: "Prepare and validate without mutating the target service." },
{ name: "--force", description: "Redeploy even when the live commit appears up to date." },
{ name: "--timeout-ms <n>", default: defaultTimeoutMs, description: "Per-step timeout budget where supported." },
{ name: "--provider-id <id>", default: "D601", description: "Provider used by artifact-registry consumers; use local only from the D601 host CLI." },
{ name: "--run-now", description: "Run apply in the foreground worker process; omit it for fire-and-forget async job mode." },
{ name: "guard code-queue-source --root <path>", description: "Validate Code Queue hostPath source relative imports before any scheduler rollout; failures report degradedReason and missing import targets." },
],
@@ -523,6 +525,7 @@ function parseOptions(args: string[]): DeployOptions {
environment,
serviceId,
commitOverride: commitOverride?.toLowerCase() ?? null,
providerId: optionValue(args, ["--provider-id", "--provider"]) ?? "D601",
runNow: args.includes("--run-now"),
dryRun: args.includes("--dry-run"),
force: args.includes("--force"),
@@ -2882,6 +2885,7 @@ async function runDevArtifactConsumerService(
"--commit", commit,
"--source-repo", desired.repo,
"--timeout-ms", String(options.timeoutMs),
"--provider-id", options.providerId,
"--run-now",
...(options.dryRun ? ["--dry-run"] : []),
];
@@ -3404,6 +3408,7 @@ async function runArtifactConsumerApplyNow(
...(options.dryRun && hasDeployJsonExecutorContract(service) ? ["--deploy-json-service", encodeDeployJsonServiceContract(service)] : []),
"--env", environment,
"--timeout-ms", String(options.timeoutMs),
"--provider-id", options.providerId,
"--run-now",
...(options.dryRun ? ["--dry-run"] : []),
];