Skip to content

package: support ignore files #4381

Description

@weikanglim

As authored by @jongio based on #4258. Related to #1039 , #4215

Background

We currently support .dockerignore files when uploading source for remote docker builds. This feature enhancement tracks addition of ignore files for other packaging protocols.

Work In-scope

@jongio had gotten agreements from service teams to add support for .webappignore and .funcignore files. These files are interpreted as standard .gitignore syntax. When present, these ignore files should be read as configuration to exclude files. The exclusion files apply relatively to the directory which the ignore file is present. Additional details of the implementation are specified below:

Default behavior when ignore files not present

With SCM_DO_BUILD_DURING_DEPLOYMENT=true (for app service), remoteBuild=true (for func-flex-consumption), users would not expect the following directories to be packaged:

  • node_modules (js)
  • __py_cache__, .venv (python)

Thus, we should continue applying these default exclusion behaviors when ignore files are not present.

For function apps, local.settings.json is a local configuration file that should not be expected to be published by default. We should take this into account as well. This isn't backwards compatible -- but is the right thing to do since it has been a missing user-requested feature of azd.

Explorations

  1. Should the ignore logic differ based on SCM_DO_BUILD_DURING_DEPLOYMENT? See comment here
  2. What is the function tools team plan to address the non-standard interpretation of .funcignore? .funcignore does not support wildcards azure-functions-core-tools#2701
  3. Should we support ignore files in subdirectories? What are good use cases for this?

Metadata

Metadata

Assignees

Labels

featureFeature request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions