-
Notifications
You must be signed in to change notification settings - Fork 223
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
Require charts to be in direct subdirectories of configured charts dirs #90
Conversation
Signed-off-by: Reinhard Nägele <[email protected]>
c880944
to
119e0c4
Compare
cc @Flydiverny @kunickiaj In case you're around, would you mind testing since it's related to #73 and #85? |
|
||
// check directory has a Chart.yaml and that it is in a | ||
// direct subdirectory of a configured charts directory | ||
if FileExists(chartYaml) && (parent == chartDir) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can chartDir
ever be a non-relative path and/or is parent
absolute or relative?
Could there be situations where chartDir == /my-dir/charts
and parent == charts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent
is always relative because git diff --name-only
returns relative paths. chartDir
could indeed be absolute. I just tested this and no changed directories would be detected in this case. The directory is expected to be relative to the working directory. I guess I should validate this.
Testing this locally worked for me:
(where Without this patch, both the |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tested a bit as well, work as expected to me:) remote: origin
target-branch: master
chart-dirs:
- .
- infrastructure |
Fixes a regression introduced in #73 so that chart directories were no longer required to be in a direct subdirectory of configured chart directories.
This caused problems in helm/charts#10830.
cc @munnerz