Skip to content

Commit 238c5b2

Browse files
committed
[WIP] Update to go 1.8.0
Fixes kubernetes#1172
1 parent fa118e1 commit 238c5b2

File tree

7 files changed

+39
-11
lines changed

7 files changed

+39
-11
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo: require
44
dist: trusty
55

66
go:
7-
- 1.7.1
7+
- 1.8
88
go_import_path: k8s.io/minikube
99

1010
install:

BUILD_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Build Requirements
2-
* A recent Go distribution (>1.7)
2+
* A recent Go distribution (>=1.8)
33
* If you're not on Linux, you'll need a Docker installation
44
* Minikube requires at least 4GB of RAM to compile, which can be problematic when using docker-machine
55

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DEB_VERSION ?= $(VERSION_MAJOR).$(VERSION_MINOR)-$(VERSION_BUILD)
2121
INSTALL_SIZE ?= $(shell du out/minikube-windows-amd64.exe | cut -f1)
2222
BUILDROOT_BRANCH ?= 2016.08
2323
REGISTRY?=gcr.io/k8s-minikube
24-
DARWIN_BUILD_IMAGE ?= karalabe/xgo-1.7.3
24+
DARWIN_BUILD_IMAGE ?= karalabe/xgo-1.8.1
2525
ISO_BUILD_IMAGE ?= $(REGISTRY)/buildroot-image
2626

2727
# The iso will be versioned the same as minikube
@@ -33,7 +33,7 @@ GOARCH ?= $(shell go env GOARCH)
3333
BUILD_DIR ?= ./out
3434
ORG := k8s.io
3535
REPOPATH ?= $(ORG)/minikube
36-
BUILD_IMAGE ?= gcr.io/google_containers/kube-cross:v1.7.1-0
36+
BUILD_IMAGE ?= gcr.io/google_containers/kube-cross:v1.8.1-1
3737
IS_EXE ?=
3838

3939
ifeq ($(IN_DOCKER),1)

hack/jenkins/minikube_cross_build_and_upload.sh

+27-3
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,40 @@ if out="$(git diff ${ghprbActualCommit} --name-only $(git merge-base origin/mast
3535
make release-iso
3636
fi
3737

38+
# Fetch the gimme script
39+
curl -sL -o $(pwd)/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
40+
chmod +x $(pwd)/gimme
41+
42+
# Check what's on the build machine
43+
go version
44+
45+
# Install the go 1.8
46+
export GIMME_GO_VERSION=1.8
47+
$(pwd)/gimme
48+
source $HOME/.gimme/envs/go1.8.env
49+
export GOROOT=$HOME/.gimme/versions/go1.8.linux.amd64/
50+
51+
# Check the version
52+
go version
3853

3954
# Build all platforms (Windows, Linux, OSX)
4055
make cross
4156

57+
# Debug
58+
env
59+
date
60+
4261
# Build the e2e test target for Darwin and Linux. We don't run tests on Windows yet.
4362
# We build these on Linux, but run the tests on different platforms.
4463
# This makes it easier to provision slaves, since they don't need to have a go toolchain.'
45-
GOPATH=$(pwd)/_gopath GOOS=darwin GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-darwin-amd64
46-
GOPATH=$(pwd)/_gopath GOOS=linux GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-linux-amd64
47-
GOPATH=$(pwd)/_gopath GOOS=windows GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-windows-amd64.exe
64+
echo "Compiling GOOS=linux GOARCH=amd64"
65+
GOPATH=$(pwd)/_gopath:$HOME/go GOOS=linux GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-linux-amd64
66+
67+
echo "Compiling GOOS=darwin GOARCH=amd64"
68+
GOPATH=$(pwd)/_gopath:$HOME/go GOOS=darwin GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-darwin-amd64
69+
70+
echo "Compiling GOOS=windows GOARCH=amd64"
71+
GOPATH=$(pwd)/_gopath:$HOME/go GOOS=windows GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-windows-amd64.exe
4872
cp -r test/integration/testdata out/
4973

5074
# Don't upload the buildroot artifacts if they exist

hack/jenkins/minikube_set_pending.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
set -e
2828
set +x
2929

30-
for job in "OSX-Virtualbox" "OSX-XHyve" "Linux-Virtualbox" "Linux-KVM" "Windows-HyperV"; do
30+
for job in "OSX-Virtualbox" "Linux-Virtualbox" "Linux-KVM"; do
3131
target_url="https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${job}.txt"
3232
curl "https://api.github.com/repos/kubernetes/minikube/statuses/${ghprbActualCommit}?access_token=$access_token" \
3333
-H "Content-Type: application/json" \

pkg/minikube/service/service.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ func printURLsForService(c corev1.CoreV1Interface, ip, service, namespace string
165165
return nil, err
166166
}
167167

168-
u, err := url.Parse(doc.String())
168+
value := doc.String()
169+
if !strings.HasPrefix(value, "https://") && !strings.HasPrefix(value, "http://") {
170+
value = "https://" + value
171+
}
172+
u, err := url.Parse(value)
169173
if err != nil {
170174
return nil, err
171175
}

pkg/minikube/service/service_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func TestPrintURLsForService(t *testing.T) {
242242
serviceName: "mock-dashboard",
243243
namespace: "default",
244244
tmpl: defaultTemplate,
245-
expectedOutput: []string{"127.0.0.1:1111", "127.0.0.1:2222"},
245+
expectedOutput: []string{"https://127.0.0.1:1111", "https://127.0.0.1:2222"},
246246
},
247247
{
248248
description: "empty slice for no node ports",
@@ -307,7 +307,7 @@ func TestGetServiceURLs(t *testing.T) {
307307
{
308308
Namespace: "default",
309309
Name: "mock-dashboard",
310-
URLs: []string{"127.0.0.1:1111", "127.0.0.1:2222"},
310+
URLs: []string{"https://127.0.0.1:1111", "https://127.0.0.1:2222"},
311311
},
312312
{
313313
Namespace: "default",

0 commit comments

Comments
 (0)