Skip to content
Snippets Groups Projects
Commit 46977feb authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch '1087-extend-support-for-app-pinning' into 'main'

Resolve "Extend support for app pinning"

Closes #1087

See merge request !557
parents f4d32587 1b2758d1
No related branches found
No related tags found
1 merge request!557Resolve "Extend support for app pinning"
Pipeline #44216 passed with stages
in 6 minutes and 57 seconds
......@@ -115,10 +115,16 @@ data:
# Where to install the app
target_directory="/var/www/html/custom_apps"
# We need to edit $ to be able to use `tpl` inside a `range`,
# see https://github.com/helm/helm/issues/5979#issuecomment-518231758
# allows us to use version variable in the release_filename
# see https://github.com/helm/helm/issues/5979#issuecomment-518231758 .
# This allows us to use version variable in the `release_filename` or
# `raw_url`.
{{- $_ := set $ "version" .version}}
curl "https://github.com/{{ .github_repository }}/releases/download/{{ .version }}/{{ tpl .release_filename $ }}" -Lo "{{ .name }}.tar.gz"
{{- if .raw_url }}
url="{{ tpl .raw_url }}"
{{- else }}
url="https://github.com/{{ .github_repository }}/releases/download/{{ .version }}/{{ tpl .release_filename $ }}"
{{- end }} # end if .raw_url
curl "$url" -Lo "{{ .name }}.tar.gz"
# If the above url results in a 404, curl will not complain and store the
# body of the 404 in the file :/. So we check here whether we actually
# got a valid archive; `tar` will fail if not.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment