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 --quietCommon 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
gcloud run deploy: Ship to Cloud Run in CIDeploy a container or source to Cloud Run from a pipeline: the flags you need, a CI example, and the deploy e…
gcloud storage cp: Upload Artifacts to GCS in CICopy files to and from Cloud Storage in CI: recursive and parallel flags, an upload example, and the bucket a…
gcloud builds submit: Build with Cloud Build in CISubmit a build to Cloud Build from CI: key flags for tag and config, a pipeline example, and the build errors…