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

fix(kubectl): krew action does not work #41

Merged
merged 1 commit into from
Apr 5, 2020
Merged

Conversation

gianarb
Copy link
Member

@gianarb gianarb commented Apr 5, 2020

The currently deployed release workflow does not work. The template file
for krew does not get translated correctly.

This is an attempt to fix this issue

11:42 $ docker run -v $PWD/.krew/profefe.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.37   krew-release-bot template --tag v0.3.0 --template-file /tmp/template-file.yaml > /tmp/ciao
time="2020-04-05T09:43:35Z" level=info msg="getting sha256 for https://github.com/profefe/kube-profefe/releases/download/v0.3.0/kube-profefe_v0.3.0_Darwin_x86_64.tar.gz"
time="2020-04-05T09:44:03Z" level=info msg="downloaded file /tmp/266050939/1586079815"
time="2020-04-05T09:44:03Z" level=info msg="getting sha256 for https://github.com/profefe/kube-profefe/releases/download/v0.3.0/kube-profefe_v0.3.0_Linux_x86_64.tar.gz"
time="2020-04-05T09:44:40Z" level=info msg="downloaded file /tmp/965187230/1586079843"
time="2020-04-05T09:44:40Z" level=fatal msg="failed to get plugin name from processed template.\nerr: error converting YAML to JSON: yaml: line 19: did not find expected '-' indicator"

Signed-off-by: Gianluca Arbezzano gianarb92@gmail.com

@rajatjindal
Copy link

ok I looked more closely. it can be fixed by adding 'indent 6' at the end. e.g.

      {{addURIAndSha "https://github.com/rajatjindal/kubectl-whoami/releases/download/{{ .TagName }}/kubectl-whoami_{{ .TagName }}_darwin_amd64.tar.gz" .TagName | indent 6 }}

The currently deployed release workflow does not work. The template file
for krew does not get translated correctly.

This is an attempt to fix this issue

```
11:42 $ docker run -v $PWD/.krew/profefe.yaml:/tmp/template-file.yaml rajatjindal/krew-release-bot:v0.0.37   krew-release-bot template --tag v0.3.0 --template-file /tmp/template-file.yaml > /tmp/ciao
time="2020-04-05T09:43:35Z" level=info msg="getting sha256 for https://github.com/profefe/kube-profefe/releases/download/v0.3.0/kube-profefe_v0.3.0_Darwin_x86_64.tar.gz"
time="2020-04-05T09:44:03Z" level=info msg="downloaded file /tmp/266050939/1586079815"
time="2020-04-05T09:44:03Z" level=info msg="getting sha256 for https://github.com/profefe/kube-profefe/releases/download/v0.3.0/kube-profefe_v0.3.0_Linux_x86_64.tar.gz"
time="2020-04-05T09:44:40Z" level=info msg="downloaded file /tmp/965187230/1586079843"
time="2020-04-05T09:44:40Z" level=fatal msg="failed to get plugin name from processed template.\nerr: error converting YAML to JSON: yaml: line 19: did not find expected '-' indicator"

```

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
@gianarb gianarb force-pushed the fix/krew-release-action branch from 77a7464 to a5fbf44 Compare April 5, 2020 17:09
@gianarb gianarb merged commit 0b643ed into master Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kubectl It is in the kubectl plugin space
Development

Successfully merging this pull request may close these issues.

2 participants