42 lines
1.8 KiB
Ruby
42 lines
1.8 KiB
Ruby
class Sonobuoy < Formula
|
|
desc "Kubernetes component that generates reports on cluster conformance"
|
|
homepage "https://github.com/vmware-tanzu/sonobuoy"
|
|
url "https://github.com/vmware-tanzu/sonobuoy/archive/v0.19.0.tar.gz"
|
|
sha256 "973d80c1682e52e69c19104cc0080deccdf1ed800823fef4ad98bba3374cd8a2"
|
|
license "Apache-2.0"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "91c7f3fc4f1d95d39c04a9c99998c4567024667828b16ee1466c35da4dd27a11" => :big_sur
|
|
sha256 "9dcf27cc22316867f46203d9c5a01fbd9c91c971765cefd636624a6291d590cb" => :catalina
|
|
sha256 "fdded1d50d8ef5d5410c17094b4718950b02f120e7542fbeee663e130f9c6138" => :mojave
|
|
sha256 "cb90822ab35edb6a86a437100736a559f872c176930dd7ead6bbbd39bbcc7724" => :high_sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
resource "sonobuoyresults" do
|
|
url "https://raw.githubusercontent.com/vmware-tanzu/sonobuoy/master/pkg/client/results/testdata/results-0.10.tar.gz"
|
|
sha256 "a945ba4d475e33820310a6138e3744f301a442ba01977d38f2b635d2e6f24684"
|
|
end
|
|
|
|
def install
|
|
system "go", "build", "-ldflags",
|
|
"-s -w -X github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.Version=v#{version}",
|
|
*std_go_args
|
|
prefix.install_metafiles
|
|
end
|
|
|
|
test do
|
|
resources.each { |r| r.verify_download_integrity(r.fetch) }
|
|
assert_match "Sonobuoy is an introspective kubernetes component that generates reports on cluster conformance",
|
|
shell_output("#{bin}/sonobuoy 2>&1")
|
|
assert_match version.to_s,
|
|
shell_output("#{bin}/sonobuoy version 2>&1")
|
|
assert_match "name: sonobuoy",
|
|
shell_output("#{bin}/sonobuoy gen --kube-conformance-image-version=v1.14 2>&1")
|
|
assert_match "all tests",
|
|
shell_output("#{bin}/sonobuoy e2e --show=all " + resource("sonobuoyresults").cached_download + " 2>&1")
|
|
end
|
|
end
|