Search code examples
google-app-enginegcloud

See the files that will be deploy to Google AppEngine


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?


Solution

  • 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'}, ...]