如何在travis管道中安装helm

How to install helm in travis pipeline

我这样做是为了在我的 travis 作业中安装 helm

curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm

并且当命令 helm init --client-only 在 travis 中运行时,它说

Not Really a helm install

有人可以帮我解决这个问题吗?

正如 官方 Helm 指南 中的 Installing Helm 章节所述:

  1. Download your desired version from here
  2. Unpack it (tar -zxvf helm-v3.0.0-linux-amd64.tar.gz)
  3. Find the helm binary in the unpacked directory, and move it to its desired destination (mv Linux-amd64/helm /usr/local/bin/helm).

From there, you should be able to run the client and add the stable repo : helm help

这条命令是在Travis管道中安装helm的正确方法:

curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

然后您可以使用

进行检查
helm version