summaryrefslogtreecommitdiffstats
path: root/clover/cloverctl/build.sh
blob: e67e4daf9fc7a483ede22d8e322d3d5580f15e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) Authors of Clover
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0

GOVERSION=1.10.3
OS=linux
ARCH=amd64
GOPATH=/home/ubuntu/go
CLIENTGOVERSION=v8.0.0

# Install go on Ubuntu 16.04

wget https://dl.google.com/go/go$GOVERSION.$OS-$ARCH.tar.gz
sudo tar -C /usr/local -xzf go$GOVERSION.$OS-$ARCH.tar.gz
export PATH=$PATH:/usr/local/go/bin
export PATH=$GOPATH/bin:$PATH

# Get dependencies

go get github.com/ghodss/yaml
go get github.com/tools/godep
go get -u github.com/spf13/cobra/cobra
go get -u gopkg.in/resty.v1

go get k8s.io/apimachinery/pkg/runtime
go get k8s.io/client-go/...
cd $GOPATH/src/k8s.io/client-go
git checkout $CLIENTGOVERSION
godep restore ./...
rm -rf vendor/

# Build cloverctl

go install cloverctl