GoogleContainerTools / GoogleContainerTools/skaffold
Configuration dependencies don't resolve paths to deploy hooks
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
When having a toplevel configution like this:
```
apiVersion: skaffold/v2beta25
kind: Config
requires:
- configs: ["cfg1"]
path: cfg1/skaffold.yaml
- configs: ["cfg2"]
path: cfg2/skaffold.yaml
```
When the skaffold.yaml files in ./cfg1 and ./cfg2 define deploy hooks, the paths to these hooks should resolved relative to the ./cfg1, or ./cfg2 directory. For instance if ./cfg2 has:
```
deploy:
kubectl:
manifests:
- deploy/kubernetes.yaml
hooks:
before:
- host:
command: ["sh", "-c", "deploy/skaffold-before-hook.sh"]
```
it should look for `skaffold-before-hook.sh` in ./cfg2/deploy/ and not in ./deploy. Also, any files that are created or referenced by this hook should be relative to ./cfg2
### Actual behavior
hooks are resolved relative to the toplevel directory. I have to make a symlink ./deploy/skaffold-before-hook.sh --> ../cfg2/deploy/skaffold-before-hook.sh
### Information
- Skaffold version: 1.37.0
- Operating system: Linux Ubuntu 20.04
- Installed via: skaffold.dev
Contributor guide
Assessment
This issue has not been assessed yet.