Skip to content

Commit

Permalink
[WIP] Update to go 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dims committed Mar 1, 2017
1 parent 0c616a6 commit 1c134ab
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sudo: require
dist: trusty

go:
- 1.7.1
- 1.8
go_import_path: k8s.io/minikube

install:
Expand Down
2 changes: 1 addition & 1 deletion BUILD_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Build Requirements
* A recent Go distribution (>1.7)
* A recent Go distribution (>=1.8)
* If you're not on Linux, you'll need a Docker installation
* Minikube requires at least 4GB of RAM to compile, which can be problematic when using docker-machine

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ GOARCH ?= $(shell go env GOARCH)
BUILD_DIR ?= ./out
ORG := k8s.io
REPOPATH ?= $(ORG)/minikube
BUILD_IMAGE ?= gcr.io/google_containers/kube-cross:v1.7.1-0
BUILD_IMAGE ?= gcr.io/google_containers/kube-cross:v1.8.0-1
IS_EXE ?=

ifeq ($(IN_DOCKER),1)
Expand Down
21 changes: 18 additions & 3 deletions hack/jenkins/minikube_cross_build_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,31 @@ if out="$(git diff origin/master --name-only | grep deploy/iso/minikube)" &> /de
make release-iso
fi

# Fetch the gimme script
curl -sL -o $(pwd)/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x $(pwd)/gimme

# Install the go 1.8
export GIMME_GO_VERSION=1.8
$(pwd)/gimme
source $HOME/.gimme/envs/go1.8.env

# Check the version
go version

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

# Debug
env
date

# Build the e2e test target for Darwin and Linux. We don't run tests on Windows yet.
# We build these on Linux, but run the tests on different platforms.
# This makes it easier to provision slaves, since they don't need to have a go toolchain.'
GOPATH=$(pwd)/_gopath GOOS=darwin GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-darwin-amd64
GOPATH=$(pwd)/_gopath GOOS=linux GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-linux-amd64
GOPATH=$(pwd)/_gopath GOOS=windows GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-windows-amd64.exe
GOPATH=$(pwd)/_gopath:$HOME/go GOOS=darwin GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-darwin-amd64
GOPATH=$(pwd)/_gopath:$HOME/go GOOS=linux GOARCH=amd64 go test -c k8s.io/minikube/test/integration --tags=integration -o out/e2e-linux-amd64
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
cp -r test/integration/testdata out/

# Don't upload the buildroot artifacts if they exist
Expand Down
6 changes: 5 additions & 1 deletion pkg/minikube/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ func printURLsForService(c corev1.CoreInterface, ip, service, namespace string,
return nil, err
}

u, err := url.Parse(doc.String())
value := doc.String()
if !strings.HasPrefix(value, "https://") && !strings.HasPrefix(value, "http://") {
value = "https://" + value
}
u, err := url.Parse(value)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func TestPrintURLsForService(t *testing.T) {
serviceName: "mock-dashboard",
namespace: "default",
tmpl: defaultTemplate,
expectedOutput: []string{"127.0.0.1:1111", "127.0.0.1:2222"},
expectedOutput: []string{"https://127.0.0.1:1111", "https://127.0.0.1:2222"},
},
{
description: "empty slice for no node ports",
Expand Down Expand Up @@ -307,7 +307,7 @@ func TestGetServiceURLs(t *testing.T) {
{
Namespace: "default",
Name: "mock-dashboard",
URLs: []string{"127.0.0.1:1111", "127.0.0.1:2222"},
URLs: []string{"https://127.0.0.1:1111", "https://127.0.0.1:2222"},
},
{
Namespace: "default",
Expand Down

0 comments on commit 1c134ab

Please sign in to comment.