{
  "slug": "gcloud-builds-submit-adds-publish-for-pack-builds-7e878e2c2a10",
  "title": "gcloud builds submit adds --publish for pack builds",
  "tools": [
    "gcloud"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-10T00:00:00.000Z",
  "announced_at": "2026-03-10T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When building an image directly on Artifact Registry with buildpacks, submit the source with `gcloud builds submit --pack image=<LOCATION>-docker.pkg.dev/<PROJECT_ID>/<REPO_NAME>/<IMAGE_NAME>`. The documented command builds and uploads the image to the repository; the release note says `--publish` is for pack builds.",
    "examples": [
      "gcloud builds submit --pack image=<LOCATION>-docker.pkg.dev/<PROJECT_ID>/<REPO_NAME>/<IMAGE_NAME>"
    ],
    "gotchas": [
      "--pack (required): Selects the CNCF buildpack build; `image` is required. `builder` and `env` are optional. Mutually exclusive with `--config` and `--tag`.",
      "--pack image (required): Image name must use the `gcr.io` or `pkg.dev` namespace. For Artifact Registry, use `<LOCATION>-docker.pkg.dev/<PROJECT_ID>/<REPO_NAME>/<IMAGE_NAME>`.",
      "--pack builder: Optional custom builder image; defaults to `gcr.io/buildpacks/builder`.",
      "--pack env: Optional environment variables passed to the builder as a list of key-values.",
      "--publish: The release note says this flag was added to `gcloud builds submit` for pack builds to build images directly on Artifact Registry instead of local Docker. The current command reference does not document this flag.",
      "Prerequisite: Install and initialize the Google Cloud CLI; enable the Cloud Build and Artifact Registry APIs; have billing enabled and access to a container image repository.",
      "Prerequisite: Use an Artifact Registry Docker repository and an image name in the `<LOCATION>-docker.pkg.dev/<PROJECT_ID>/<REPO_NAME>/<IMAGE_NAME>` form.",
      "`--publish` is for pack builds.",
      "Docs conflict: Current `gcloud builds submit` reference and buildpacks guide do not document `--publish`; release note states it was added for pack builds. The documented current example omits the flag, so an invocation including it cannot be verified from the command reference."
    ]
  },
  "why_it_matters": "Submit a pack build when building an image directly on Artifact Registry.",
  "sources": [
    "https://docs.cloud.google.com/sdk/docs/release-notes#56000_2026-03-10",
    "https://docs.cloud.google.com/docs/buildpacks/build-application",
    "https://docs.cloud.google.com/sdk/gcloud/reference/builds/submit"
  ],
  "rank": 0.95032,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "cloud-20261008",
    "verdict_id": "cloud-20261008:cloud-20261008-6ba97c6902716ec8-2:gate",
    "evidence_hash": "6684f167aa956df5d27d9b0aec0a1857545582f215788b1ca8f4e3cbeb0c0efc"
  },
  "review": {
    "draft_hash": "083723532d2329e60256d3e9c0433d0ef9545393ac01fd4e71651a5ceb5624ad",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "cloud-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.66 (>= 0.6 needed)."
  }
}
