Skip to content
Latchkey

gcloud app deploy: Deploy App Engine in CI

Deploy an App Engine service from an app.yaml descriptor.

gcloud app deploy builds and deploys an App Engine service described by app.yaml. In CI you control the version label and whether the new version receives traffic, which lets you do safe promote-after-test rollouts.

Common flags

  • DEPLOYABLES - one or more app.yaml files (positional)
  • --version=VERSION - explicit version id
  • --no-promote - deploy without routing traffic to the new version
  • --quiet - skip the confirmation prompt

Example in CI

Deploy a new version without promoting it, for smoke testing.

shell
gcloud app deploy app.yaml \
  --version=${GITHUB_SHA::7} --no-promote --quiet

Common errors in CI

  • NOT_FOUND: Unable to retrieve P4SA - App Engine app not yet created in the project
  • PERMISSION_DENIED: ... appengine.applications.update - SA missing roles/appengine.deployer
  • Error 403: ... build ... Cloud Build - Cloud Build API or staging bucket permissions missing

Key takeaways

  • Deploys an App Engine service from app.yaml.
  • Use --no-promote to ship a version, test it, then promote separately.
  • The App Engine app must already exist in the project before deploying.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →