代码之家  ›  专栏  ›  技术社区  ›  gmolau

“gcloud deploy”抱怨既有.gcloudignore文件又有skip\u文件,尽管我两者都没有

  •  1
  • gmolau  · 技术社区  · 7 年前

    我正在尝试将Django(v2.1)应用程序部署到appengines Python37运行时。这是我的 app.yaml 是从一个 Google example

    # [START django_app]
    runtime: python37
    #api_version: 1
    #threadsafe: yes
    
    handlers:
    - url: /static
      static_dir: static/
    - url: .*
      script: <project_name>.wsgi.application
    
    # Only pure Python libraries can be vendored
    # Python libraries that use C extensions can
    # only be included if they are part of the App Engine SDK 
    # Using Third Party Libraries: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27
    #libraries:
    #- name: MySQLdb
    #  version: 1.2.5
    # [END django_app]
    
    # Google App Engine limits application deployments to 10,000 uploaded files per
    # version. The skip_files section allows us to skip virtual environment files
    # to meet this requirement. The first 5 are the default regular expressions to
    # skip, while the last one is for all env/ files.
    #skip_files:
    #- ^(.*/)?#.*#$
    #- ^(.*/)?.*~$
    #- ^(.*/)?.*\.py[co]$
    #- ^(.*/)?.*/RCS/.*$
    #- ^(.*/)?\..*$
    #- ^env/.*$
    

    除了最基本的设置之外,所有的设置都被注释掉了,并且没有 .gcloudignore gcloud app deploy

    ERROR: (gcloud.app.deploy) You cannot use skip_files and have a .gcloudignore file in the same application. You should convert your skip_files patterns and put them in your .gcloudignore file. For information on the format and syntax of .gcloudignore files, see https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore.
    

    我在某个地方读到过.glcoudignore是在部署过程中自动创建的,但即使这样也不应该是个问题,因为我没有 skip_files 在我的

    有人能告诉我我做错了什么吗?

    1 回复  |  直到 7 年前
        1
  •  7
  •   GAEfan    7 年前

    Gcloud deploy正在查看 #skip_files: