Merge "helm-repository: make it work on non-x86"

This commit is contained in:
Jenkins 2017-04-21 15:37:41 +00:00 committed by Gerrit Code Review
commit 6a9681ba9b
1 changed files with 11 additions and 3 deletions

View File

@ -46,11 +46,19 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
RUN {{ macros.install_pip(helm_repository_pip_packages | customizable("pip_packages"), constraints = false) }}
ENV helm_arch={{ base_arch }}
{% if base_arch == 'x86_64' %}
ENV helm_arch=amd64
{% elif base_arch == 'aarch64' %}
ENV helm_arch=arm64
{% endif %}
{% block helm_repository_install_kubernetes_helm %}
RUN curl -Lo /tmp/helm-v${helm_version}-linux-amd64.tar.gz http://storage.googleapis.com/kubernetes-helm/helm-v${helm_version}-linux-amd64.tar.gz \
&& sudo tar --strip-components 1 -C /usr/bin linux-amd64/helm -zxvf /tmp/helm-v${helm_version}-linux-amd64.tar.gz \
RUN curl -Lo /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz http://storage.googleapis.com/kubernetes-helm/helm-v${helm_version}-linux-${helm_arch}.tar.gz \
&& sudo tar --strip-components 1 -C /usr/bin linux-${helm_arch}/helm -zxvf /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz \
&& sudo chmod 755 /usr/bin/helm \
&& rm /tmp/helm-v${helm_version}-linux-amd64.tar.gz
&& rm /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz
{% endblock %}
RUN useradd --user-group --create-home --home-dir /home/helm helm \