查看将要部署到Google AppEngine的文件 [英] See the files that will be deploy to Google AppEngine
问题描述
我正在寻找方法来确保我使用 gcloud app deploy
部署到Google AppEngine(Python)的文件只是我需要的文件。
在日志文件中,它只列出跳过的文件,但不包含已部署的文件。
有没有办法看到这个列表?
所有文件和目录在应用程序服务/模块目录下相应的服务/模块的 .yaml
文件存在)将在部署相应的应用程序服务/模块时部署,除非它们被跳过文件(即它们匹配默认或配置 skip_files
模式 - 请参阅 app.yaml
skip_files 行> 语法 doc table)。
所以你可以获得服务/模块的递归列表目录(确保你关注/ include sym-linked子目录),然后从它中删除跳过的文件。
或者,如果您使用 appcfg.py update
来进行部署,您可以使用它的 - noisy
选项,这将使其显示所需的信息,像这样:
...
09:31 AM扫描本地磁盘上的文件。
...
2016-11-25 09:31:28,131信息appcfg.py:2516处理文件'mail.py'
2016-11-25 09:31:28,131信息appcfg .py:2657忽略文件'mail.pyc':文件匹配忽略正则表达式。
2016-11-25 09:31:28,132信息appcfg.py:2516处理文件'main.py'
2016-11-25 09:31:28,132信息appcfg.py:2657忽略文件' main.pyc':文件匹配忽略正则表达式。
2016-11-25 09:31:28,132信息appcfg.py:2516处理文件'main.yaml'
2016-11-25 09:31:28,133 INFO appcfg.py:2516处理文件' queue.yaml'
2016-11-25 09:31:28,133 INFO appcfg.py:2516处理文件'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'} ,...]
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?
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'}, ...]
这篇关于查看将要部署到Google AppEngine的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!