import { type Result } from "@fjall/generator"; import type { DeployParams } from "../../types/params.js"; import type { DeployCallbacks } from "../../types/callbacks.js"; import type { ApplicationOperation } from "../../types/operations.js"; import type { DeployServices } from "../serviceFactory.js"; export declare const DOCKER_BUILD_STEP_NAME = "Building and pushing Docker image"; export declare function ecrRepoUri(accountId: string, region: string, appName: string): string; /** * Everything the build phase knows about what it pushed. The tag map drives * the CDK `ImageTag` parameters; the digest map + repo URI feed the * full-deploy `ServiceArtefact[]` collection. */ export interface DockerBuildProducts { contentHashTagsByService: Record; imageDigestsByService: Record; /** * ECR repository URI the images were pushed to. Absent on the legacy * single-image fallback path (no manifest), where no content-hash tags are * produced either. */ repoUri?: string; } export declare function emptyBuildProducts(): DockerBuildProducts; /** * Run Docker build and push before deploying the Compute stack. * * Reads the post-synth `cdk.out/fjall-manifest.json` to discover the set of * services that need container images, resolves each service's * `(buildContext, dockerfilePath, target)` tuple, groups identical builds, * and pushes each group to ECR addressed by digest only (no moving tag), so * the repository can stay IMMUTABLE. * * After each group's push, the helper derives a content-hash tag from the * digest (`deriveContentHashTag` at `@fjall/util`) and applies it via * `tagByDigest` (flat-manifest carbon copy, no layer re-upload). The resulting * `DockerBuildProducts` carries the `` → `` map * (plumbed into the CDK deploy via `--parameters ImageTag=`) * plus the per-service digests and repo URI for artefact collection. * * Falls back to the legacy single-image path (`/Dockerfile` → * `:latest`) when the manifest is absent. The legacy path returns * empty products; the orchestrator skips parameter plumbing for that branch. */ export declare function runDockerBuild(params: DeployParams, services: DeployServices, operation: ApplicationOperation, callbacks: DeployCallbacks): Promise>;