Skip to content

.ebignore doesn't strictly follow .gitignore syntax #114

Closed
@ZYinMD

Description

@ZYinMD

Description

In .gitignore (doc), /* means "everything, including folders, in the root path relative to the .gitignore file".

This is a good starting point to construct a "whitelist" where you use ! to include only the files you want.

However, it seems /* in .ebignore won't ignore folders.

Steps to reproduce

Create a folder structure like this:

root
  |--.git/
  |--node_modules/
  |    |--deps/
  |    |--useless-dev-deps/
  |--some-other-folder/
  |    |--other-folder-content.txt
  |--server.js
  |--package.json
  |--README.md
  |--.ebignore

Then construct a whitelist with .ebignore:

# start off by ignoring everything
\*

# other than these 2 files, nothing else is required for this deployment to work 
!server.js
!package.json

Then deploy with eb deploy, then inspect the zip file in eb console.

Observed result

  1. README.md is successfully ignored
  2. .git, node_modules, and some-other-folder are included in the zip.

Expected result

If .ebignore works the same way as .gitignore, .git, node_modules, and some-other-folder shouldn't be zipped.

(irrelevant note: Google App Engine has an equivalent .gcloudignore file, which behaves consistently with this "expected result")

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Win10
  2. EBCLI version: 3.20.3 (Python 3.9.6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions