17

I'm looking for way to make sure the files I deploy to Google AppEngine (Python) using gcloud app deploy are only the files I need.
In the log file it only list files that are skipped but not the files that are deployed.

Is there a way to see this list?

Ido Ran
  • 10,584
  • 17
  • 80
  • 143
  • This can be helpful -> https://stackoverflow.com/questions/56064907/viewing-deployed-files-app-engine-standard – Raikish Jan 21 '21 at 21:08

2 Answers2

14

There is now a gcloud command to show this: gcloud meta list-files-for-upload.

Bubz0
  • 392
  • 2
  • 10
9

All the files and directories present or sym-linked under an app service/module directory (i.e. the directory where the respective service/module's .yaml file exists) will be deployed when the respective app service/module is deployed, unless they're skipped files (i.e. they match the default or configured skip_files patterns - see the skip_files row in the app.yaml Syntax doc table).

So you can obtain a recursive listing of your service/module directory (make sure you follow/include sym-linked sub-directories), then drop the skipped files from it.

Alternatively, if you are using appcfg.py update for deployment, you can use its --noisy option which will make it display, among other stuff, that desired info, like this:

...
09:31 AM Scanning files on local disk.
...
2016-11-25 09:31:28,131 INFO appcfg.py:2516 Processing file 'mail.py' 
2016-11-25 09:31:28,131 INFO appcfg.py:2657 Ignoring file 'mail.pyc': File matches ignore regex. 
2016-11-25 09:31:28,132 INFO appcfg.py:2516 Processing file 'main.py' 
2016-11-25 09:31:28,132 INFO appcfg.py:2657 Ignoring file 'main.pyc': File matches ignore regex. 
2016-11-25 09:31:28,132 INFO appcfg.py:2516 Processing file 'main.yaml' 
2016-11-25 09:31:28,133 INFO appcfg.py:2516 Processing file 'queue.yaml' 
2016-11-25 09:31:28,133 INFO appcfg.py:2516 Processing file 'templates/admin.html' 
...

Unfortunately I don't see a similar option for gcloud app deploy.

EDIT:

As of Google Cloud SDK 171.0.0 adding the option --verbosity=info provides you with processed files in a log line after it finishes uploading the files

INFO: Manifest: [{'path/of/file/': {'sourceUrl': 'https://storage.googleapis.com/staging.project.appspot.com/hash', 'sha1Sum': 'hash'}, ...]

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • so does that mean you cannot see the files deployed in the google cloud platform console if you used the `gcloud app deploy` option to deploy the app!? – Famic Tech May 02 '17 at 14:28
  • i cannot find the files in the console (viewing the repository) that i deployed via terminal using the `gcloud app deploy` option, but i can see the files (viewing the repository ) that i cloned using through the console itself. – Famic Tech May 02 '17 at 14:30
  • @FamicTech I suspect that's because cloning the repo in the console produces another repo with all its files, but deploying does't do that - it just uploads *some* of the repo content (the one which isn't skipped). And the deployed code is not normally visible in the console, see http://stackoverflow.com/questions/42122249/google-cloud-how-to-deploy-mirrored-repository – Dan Cornilescu May 03 '17 at 05:19