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!: disable sparse checkout #245

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ to the plugin, please see [these instructions](.github/CONTRIBUTING.md).

Here's the Git urls format, followed by examples:

git+https://[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]
git+ssh://git@[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]
git+file://[path/to/repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]
git+https://[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=1][&depupdate=0]]
git+ssh://git@[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=1][&depupdate=0]]
git+file://[path/to/repo]@[path/to/charts][?[ref=git-ref][&sparse=1][&depupdate=0]]

git+https://github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=0
git+ssh://git@github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=1
git+https://github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=1
git+ssh://git@github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=0
git+ssh://git@github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2
git+https://github.com/istio/istio@install/kubernetes/helm?ref=1.5.4&sparse=0&depupdate=0
git+https://github.com/bitnami/charts@bitnami/wordpress?depupdate=0?ref=master&sparse=0&depupdate=0&package=0
Expand Down Expand Up @@ -78,7 +78,7 @@ Pulling value files:
**name**|**description**|**default**
--------|---------------|-----------
`ref`|Set git ref to a branch or tag. Also works for commits with `sparse=0`.|`master`
`sparse`|Set git strategy to sparse. Will try to fetch only the needed commits for the target path. If set to `0`, default git strategy will be used.|`1`
`sparse`|Set git strategy to sparse. Will try to fetch only the needed commits for the target path. If set to `0`, default git strategy will be used.|`0`
`depupdate`|Run `helm dependency update` on the retrieved chart. If set to `0`, this step is skipped.|`1`
`package`|Run `helm package` on the retrieved chart. If set to `0`, this step is skipped.|`1`

Expand Down
2 changes: 1 addition & 1 deletion helm-git-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ main() {
readonly git_ref="$git_ref"

git_sparse=$(echo "$_raw_uri" | sed '/^.*sparse=\([^&#]*\).*$/!d;s//\1/')
[ -z "$git_sparse" ] && git_sparse=1
[ -z "$git_sparse" ] && git_sparse=0

helm_depupdate=$(echo "$_raw_uri" | sed '/^.*depupdate=\([^&#]*\).*$/!d;s//\1/')
[ -z "$helm_depupdate" ] && helm_depupdate=1
Expand Down