From 8cc2c08aa705bf4edce8744431a8af767f9085b7 Mon Sep 17 00:00:00 2001 From: Mayra Cabrera Date: Sat, 7 Jul 2018 12:28:36 -0500 Subject: [PATCH] Include wget in apk add command Closes #48978 --- .../unreleased/48978-fix-helm-installation-on-cluster.yml | 5 +++++ lib/gitlab/kubernetes/helm/base_command.rb | 2 +- spec/support/shared_examples/helm_generated_script.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/unreleased/48978-fix-helm-installation-on-cluster.yml diff --git a/changelogs/unreleased/48978-fix-helm-installation-on-cluster.yml b/changelogs/unreleased/48978-fix-helm-installation-on-cluster.yml new file mode 100644 index 00000000000..f786d9e2235 --- /dev/null +++ b/changelogs/unreleased/48978-fix-helm-installation-on-cluster.yml @@ -0,0 +1,5 @@ +--- +title: Fixes base command used in Helm installations +merge_request: 20471 +author: +type: fixed diff --git a/lib/gitlab/kubernetes/helm/base_command.rb b/lib/gitlab/kubernetes/helm/base_command.rb index 3d778da90c7..f9ebe53d6af 100644 --- a/lib/gitlab/kubernetes/helm/base_command.rb +++ b/lib/gitlab/kubernetes/helm/base_command.rb @@ -18,7 +18,7 @@ module Gitlab ALPINE_VERSION=$(cat /etc/alpine-release | cut -d '.' -f 1,2) echo http://mirror.clarkson.edu/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories echo http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories - apk add -U ca-certificates openssl >/dev/null + apk add -U wget ca-certificates openssl >/dev/null wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v#{Gitlab::Kubernetes::Helm::HELM_VERSION}-linux-amd64.tar.gz | tar zxC /tmp >/dev/null mv /tmp/linux-amd64/helm /usr/bin/ HEREDOC diff --git a/spec/support/shared_examples/helm_generated_script.rb b/spec/support/shared_examples/helm_generated_script.rb index 56e86a87ab9..05d53a13fd3 100644 --- a/spec/support/shared_examples/helm_generated_script.rb +++ b/spec/support/shared_examples/helm_generated_script.rb @@ -6,7 +6,7 @@ shared_examples 'helm commands' do ALPINE_VERSION=$(cat /etc/alpine-release | cut -d '.' -f 1,2) echo http://mirror.clarkson.edu/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories echo http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories - apk add -U ca-certificates openssl >/dev/null + apk add -U wget ca-certificates openssl >/dev/null wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v2.7.0-linux-amd64.tar.gz | tar zxC /tmp >/dev/null mv /tmp/linux-amd64/helm /usr/bin/ EOS