gcloud Verified current stable Not installed? Cloud Infrastructure

Gcloud / Deploy App Code And Configuration

Deploy App Code And Configuration

Deploys application code and configuration to Google App Engine.

$
Terminal
gcloud app deploy <deployables>

When To Use

When a stable release of application code is ready for production deployment.

Pro Tip

Consider using --quiet to suppress confirmation prompts for automated deployments.

Anatomy of Output

Understanding the result

Deploying to project: my-gcp-project Project ID

Identifies the GCP project for deployment.

Uploading: file.zip Upload Status

Indicates which file is being uploaded.

Deployment complete: https://my-app.appspot.com Deployment URL

URL location of the deployed application.

Power User Variants

Optimized versions

gcloud app deploy --no-promote

Deploy without promoting the new version.

Unix Pipeline

Shell combinations

gcloud app deploy --no-promote --quiet

Deploy without prompting for confirmation.

Troubleshooting

Common pitfalls

ERROR: (gcloud.app.deploy) Invalid argument: 'deployables': File not found.

Solution: Verify the paths to deployable files are correct.

ERROR: (gcloud.app.deploy) You are not authorized to perform this operation.

Solution: Check IAM permissions for deploying to App Engine.

ERROR: (gcloud.app.deploy) Deployment failed: Timeout after 600 seconds.

Solution: Increase timeout using --timeout flag.

Command Breakdown

What each part is doing

gcloud
Base Command
The executable that performs this operation. Here it runs Gcloud before the shell applies any redirect operators.
<deployables>
deployables
The value supplied for deployables.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.