kube-aws 0.9.5
Closes #12105. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
3fc8010f6f
commit
10c8475e4a
1 changed files with 16 additions and 27 deletions
|
@ -1,11 +1,9 @@
|
|||
require "yaml"
|
||||
|
||||
class KubeAws < Formula
|
||||
desc "CoreOS Kubernetes on AWS"
|
||||
homepage "https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html"
|
||||
url "https://github.com/coreos/kube-aws/archive/v0.9.1.tar.gz"
|
||||
sha256 "45f1ac64d6e1132811cd777e2f25ce2dd131cc38d8d7c6c0257ad5c5ff8f5e26"
|
||||
head "https://github.com/coreos/kube-aws.git"
|
||||
url "https://github.com/kubernetes-incubator/kube-aws/archive/v0.9.5.tar.gz"
|
||||
sha256 "86a15c882ef63e3a24fbd96f8af0b945911b7b2092051baa397d6a5046a1d21f"
|
||||
head "https://github.com/kubernetes-incubator/kube-aws.git"
|
||||
|
||||
bottle do
|
||||
sha256 "7b073c55de427c7f981b5e2c432400bebe73d5003d5886cf3dfdbdaadfde2827" => :sierra
|
||||
|
@ -13,19 +11,14 @@ class KubeAws < Formula
|
|||
sha256 "262c04907593bbdfd04739d21740da4b34c4409c2294e376080965c0ac8e578d" => :yosemite
|
||||
end
|
||||
|
||||
devel do
|
||||
url "https://github.com/coreos/kube-aws/archive/v0.9.3.tar.gz"
|
||||
sha256 "cd33c88ee607fdcbca34af4a01b3aa386014f0394bd47c651d309b431bc51c30"
|
||||
end
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
gopath_vendor = buildpath/"_gopath-vendor"
|
||||
gopath_kube_aws = buildpath/"_gopath-kube-aws"
|
||||
kube_aws_dir = "#{gopath_kube_aws}/src/github.com/coreos/kube-aws"
|
||||
kube_aws_dir = "#{gopath_kube_aws}/src/github.com/kubernetes-incubator/kube-aws"
|
||||
|
||||
mkdir_p gopath_vendor
|
||||
gopath_vendor.mkpath
|
||||
mkdir_p File.dirname(kube_aws_dir)
|
||||
|
||||
ln_s buildpath/"vendor", "#{gopath_vendor}/src"
|
||||
|
@ -34,28 +27,24 @@ class KubeAws < Formula
|
|||
ENV["GOPATH"] = "#{gopath_vendor}:#{gopath_kube_aws}"
|
||||
|
||||
cd kube_aws_dir do
|
||||
system "go", "generate", "./config"
|
||||
if build.stable?
|
||||
system "go", "build", "-ldflags",
|
||||
"-X github.com/coreos/kube-aws/cluster.VERSION=#{version}",
|
||||
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
||||
"-o", bin/"kube-aws", "./cmd/kube-aws"
|
||||
else
|
||||
system "go", "generate", "./nodepool/config"
|
||||
system "go", "build", "-ldflags",
|
||||
"-X github.com/coreos/kube-aws/cluster.VERSION=#{version}",
|
||||
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
||||
"-o", bin/"kube-aws", "./"
|
||||
end
|
||||
system "go", "generate", "./core/controlplane/config"
|
||||
system "go", "generate", "./core/nodepool/config"
|
||||
system "go", "generate", "./core/root/config"
|
||||
system "go", "build", "-ldflags",
|
||||
"-X github.com/kubernetes-incubator/kube-aws/core/controlplane/cluster.VERSION=#{version}",
|
||||
"-a", "-tags", "netgo", "-installsuffix", "netgo",
|
||||
"-o", bin/"kube-aws", "./"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
require "yaml"
|
||||
|
||||
system "#{bin}/kube-aws"
|
||||
cluster = { "clusterName" => "test-cluster", "externalDNSName" => "dns",
|
||||
"keyName" => "key", "region" => "west",
|
||||
"availabilityZone" => "zone", "kmsKeyArn" => "arn" }
|
||||
cluster["controller"] = nil unless build.stable?
|
||||
"availabilityZone" => "zone", "kmsKeyArn" => "arn",
|
||||
"worker"=>{ "nodePools"=>[{ "name"=>"nodepool1" }] } }
|
||||
system "#{bin}/kube-aws", "init", "--cluster-name", "test-cluster",
|
||||
"--external-dns-name", "dns", "--region", "west",
|
||||
"--availability-zone", "zone", "--key-name", "key",
|
||||
|
|
Loading…
Reference in a new issue