GoogleContainerTools / GoogleContainerTools/skaffold

Support wildcards in config dependencies path

Open
#8,914 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
Able to use wildcards in file paths for config dependencies.
```yaml
requires:
- path: ./projects/*/skaffold.yaml
configs: []
```

This would be helpful since often there are multiple projects under one or more folders and even if it is not a big change to the root config it make more commits and more steps to automate editing projects.

### Actual behavior
##### Error message

parsing skaffold config: could not find skaffold config file "/Users/foo/ws/bar/x/*/skaffold.yaml" that is referenced as a dependency in config file "/Users/foo/ws/bar/skaffold.yaml": stat /Users/foo/ws/bar/x/*/skaffold.yaml: no such file or directory. Modify the `requires` definition in the configuration file "/Users/foo/ws/bar/skaffold.yaml" to point to the correct path for the dependency "/Users/foo/ws/bar/x/*/skaffold.yaml".

### Information

- Skaffold version: v2.5.1
- Operating system: macOS Ventura 13.4.1
- Installed via: Google Cloud SDK
- Contents of skaffold.yaml:

##### root skaffold.yaml at `./skaffold.yaml`
```yaml
apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: root
requires:
- configs: []
path: ./x/*/skaffold.yaml
```

##### sub skaffold.yaml at `./x/a/skaffold.yaml`
```yaml
apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: a
```

### Steps to reproduce the behavior

1. create dir `./x` and `./x/a`.
2. add `skaffold.yaml` from above information in dirs.
3. `skaffold build`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.