MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / writeCloudBuildConfig

Function writeCloudBuildConfig

packages/cli/src/commands/cloudrun.ts:433–451  ·  view source on GitHub ↗
(image: string)

Source from the content-addressed store, hash-verified

431}
432
433function writeCloudBuildConfig(image: string): string {
434 const cfgPath = join(stateDir(), "cloudrun-cloudbuild.yaml");
435 mkdirSync(stateDir(), { recursive: true });
436 // The build context (passed to `gcloud builds submit` as the repo root) is
437 // referenced as "." inside the config; the Dockerfile path is relative to
438 // that context.
439 writeFileSync(
440 cfgPath,
441 [
442 "steps:",
443 "- name: gcr.io/cloud-builders/docker",
444 ` args: ["build","-f","packages/gcp-cloud-run/Dockerfile","-t","${image}","."]`,
445 `images: ["${image}"]`,
446 "timeout: 3600s",
447 "",
448 ].join("\n"),
449 );
450 return cfgPath;
451}
452
453// ── sites create ──────────────────────────────────────────────────────────
454

Callers 1

runDeployFunction · 0.85

Calls 1

stateDirFunction · 0.85

Tested by

no test coverage detected