查看将部署到 Google AppEngine 的文件
See the files that will be deploy to Google AppEngine
我正在寻找方法来确保我使用 gcloud app deploy
部署到 Google AppEngine (Python) 的文件只是我需要的文件。
在日志文件中,它只列出跳过的文件,但不列出部署的文件。
有没有办法看到这个列表?
所有 应用程序 service/module 目录下存在或符号链接的文件和目录(即相应 service/module 的 .yaml
文件存在)将在部署相应应用程序 service/module 时部署,除非它们被跳过文件(即它们匹配默认或配置的 skip_files
模式 - 请参阅 skip_files
行在 app.yaml
Syntax 文档中 table).
因此您可以获得 service/module 目录的递归列表(确保您 follow/include 符号链接子目录),然后从中删除跳过的文件。
或者,如果您使用 appcfg.py update
进行部署,您可以使用它的 --noisy
选项,这将使它显示所需的信息以及其他内容,如下所示:
...
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'
...
很遗憾,我没有看到 gcloud app deploy
的类似选项。
编辑:
从 Google 开始,Cloud SDK 171.0.0 添加选项 --verbosity=info
在完成文件上传后在日志行中为您提供已处理的文件
INFO: Manifest: [{'path/of/file/': {'sourceUrl': 'https://storage.googleapis.com/staging.project.appspot.com/hash', 'sha1Sum': 'hash'}, ...]
现在有一个 gcloud 命令可以显示这一点:
gcloud meta list-files-for-upload
.
我正在寻找方法来确保我使用 gcloud app deploy
部署到 Google AppEngine (Python) 的文件只是我需要的文件。
在日志文件中,它只列出跳过的文件,但不列出部署的文件。
有没有办法看到这个列表?
所有 应用程序 service/module 目录下存在或符号链接的文件和目录(即相应 service/module 的 .yaml
文件存在)将在部署相应应用程序 service/module 时部署,除非它们被跳过文件(即它们匹配默认或配置的 skip_files
模式 - 请参阅 skip_files
行在 app.yaml
Syntax 文档中 table).
因此您可以获得 service/module 目录的递归列表(确保您 follow/include 符号链接子目录),然后从中删除跳过的文件。
或者,如果您使用 appcfg.py update
进行部署,您可以使用它的 --noisy
选项,这将使它显示所需的信息以及其他内容,如下所示:
...
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'
...
很遗憾,我没有看到 gcloud app deploy
的类似选项。
编辑:
从 Google 开始,Cloud SDK 171.0.0 添加选项 --verbosity=info
在完成文件上传后在日志行中为您提供已处理的文件
INFO: Manifest: [{'path/of/file/': {'sourceUrl': 'https://storage.googleapis.com/staging.project.appspot.com/hash', 'sha1Sum': 'hash'}, ...]
现在有一个 gcloud 命令可以显示这一点:
gcloud meta list-files-for-upload
.