How to ignore files when running `gcloud app deploy`?

后端 未结 3 1469
执念已碎
执念已碎 2020-12-18 20:02

When I run

gcloud app deploy app.yaml

which files actually get uploaded?

The project folder contains folders and files such as

3条回答
  •  温柔的废话
    2020-12-18 20:23

    How does gcloud app deploy decide which files get uploaded?

    It doesn't. It uploads everything by default. As mentioned in another response you can use the skip_files section in app.yaml as follows:

    skip_files:
    - ^(.*/)?#.*#$
    - ^(.*/)?.*~$
    - ^(.*/)?.*\.py[co]$
    - ^(.*/)?.*/RCS/.*$
    - ^(.*/)?\..*$
    - ^(.*/)?\.bak$
    - ^\.idea$
    - ^\.git$
    

    You can also use the --verbosity param to see what files are being deployed, i.e. gcloud app deploy app.yaml --verbosity=debug or gcloud app deploy app.yaml --verbosity=info per docs.

提交回复
热议问题