Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager/dockerfile): support file names that are all lowercase #21877

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/usage/configuration-options.md
Expand Up @@ -932,7 +932,7 @@ At other times, the possible files is too vague for Renovate to have any default
For default, Kubernetes manifests can exist in any `*.yaml` file and we don't want Renovate to parse every single YAML file in every repository just in case some of them have a Kubernetes manifest, so Renovate's default `fileMatch` for manager `kubernetes` is actually empty (`[]`) and needs the user to tell Renovate what directories/files to look in.

Finally, there are cases where Renovate's default `fileMatch` is good, but you may be using file patterns that a bot couldn't possibly guess about.
For example, Renovate's default `fileMatch` for `Dockerfile` is `['(^|/|\\.)Dockerfile$', '(^|/)Dockerfile[^/]*$']`.
For example, Renovate's default `fileMatch` for `Dockerfile` is `['(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$', '(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$']`.
This will catch files like `backend/Dockerfile`, `prefix.Dockerfile` or `Dockerfile-suffix`, but it will miss files like `ACTUALLY_A_DOCKERFILE.template`.
Because `fileMatch` is mergeable, you don't need to duplicate the defaults and could just add the missing file like this:

Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/dockerfile/index.ts
Expand Up @@ -8,8 +8,8 @@ export { extractPackageFile };

export const defaultConfig = {
fileMatch: [
'(^|/|\\.)(Docker|Container)file$',
'(^|/)(Docker|Container)file[^/]*$',
'(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$',
'(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$',
],
};

Expand Down