helmfile 0.21.0 (new formula)

Closes #28436.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dan Wendorf 2018-05-29 11:47:41 -07:00 committed by Dominyk Tiller
parent 2f41351626
commit 7ae10498c3
No known key found for this signature in database
GPG key ID: FE19AEFCF658C6F6

30
Formula/helmfile.rb Normal file
View file

@ -0,0 +1,30 @@
class Helmfile < Formula
desc "Deploy Kubernetes Helm Charts"
homepage "https://github.com/roboll/helmfile"
url "https://github.com/roboll/helmfile/archive/v0.21.0.tar.gz"
sha256 "75503bd10fbff95fa5c4d84ef2aff8f62774eeec2d5a73d1025271883cd330f2"
depends_on "go" => :build
depends_on "kubernetes-helm"
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/roboll/helmfile").install buildpath.children
cd "src/github.com/roboll/helmfile" do
system "go", "build", "-ldflags", "-X main.Version=v#{version}",
"-o", bin/"helmfile", "-v", "github.com/roboll/helmfile"
prefix.install_metafiles
end
end
test do
(testpath/"helmfile.yaml").write <<-EOS
repositories:
- name: stable
url: https://kubernetes-charts.storage.googleapis.com/
EOS
system Formula["kubernetes-helm"].opt_bin/"helm", "init", "--client-only"
output = '"stable" has been added to your repositories'
assert_match output, shell_output("#{bin}/helmfile -f helmfile.yaml repos")
end
end