-
Notifications
You must be signed in to change notification settings - Fork 4
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
Root folder in chart_path
leads to git repo in git repo
#5
Comments
Hello @Zaunei! I like that idea 😉 Maybe one could use the Line 226 in 9c2d068
opts := copy.Options{
Skip: func(src string) (bool, error) {
return filepath.Base(src) == ".git", nil
}
}
err = copy.Copy(clonedRepoDir+"/"+repoPath, chartFolderDestName, opts) But I don't think we should do it by default, so we would need to add an option to skip copying this file: repos:
# ...
- name: bootc-netbox-git
type: git
keep_git_directory: false
url: https://github.com/bootc/netbox-chart.git keepGitDirectory := true
for _, repo := range repos {
if repo.kind == "git" && repo.name == chart["repo_name"] {
keepGitDirectory = repo.keepGitDirectory
chartUrl = repo.url
break
}
}
// ...
opts := copy.Options{
Skip: func(src string) (bool, error) {
return !keepGitDirectory && filepath.Base(src) == ".git", nil
}
}
err = copy.Copy(clonedRepoDir+"/"+repoPath, chartFolderDestName, opts)
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using git repos for helm charts works great for charts that are in subfolders, it becomes impractical once the helm chart is in the root folder.
In a Monrepo approach for GitOps, there is then a git repo in a git repo, which makes checking in the files difficult.
Example:
Maybe it makes sense here to add an option to delete the
.git
folder after checkout?The text was updated successfully, but these errors were encountered: