How to download application from Google Cloud Plat

2020-04-18 05:01发布

问题:

I am trying to download Application from GCP using this link: Downloading Your Application. But it looks like this works only for the Standard environment cos code executes without errors but nothing is actually downloaded after. Output is:

AM Host: appengine.google.com
AM Fetching file list...
AM Fetching files...

What will be the solution to achieve the same result in Flexible environment?

回答1:

When you deploy an App Engine Flexible application, the source code is uploaded to Cloud Storage on your project in a bucket named staging..appspot.com. You can navigate in this bucket and download the source code for a specific version as a .tar file.

Alternatively, you can find the exact Cloud Storage URL for your source code by going to Dev Console > Container Registry > Build History and select the build for your version. You'll find the link to your source code under Build Information.

One thing to note however is that the staging... bucket is created by default with a Lifecycle rule that deletes files older than 15 days automatically. You can delete this rule if you want so that all versions' source code is kept indefinitely.