Skip to content

Commit

Permalink
Jenkins/Makefile targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlorenc committed Aug 15, 2017
1 parent 703d992 commit 2ac1dd6
Show file tree
Hide file tree
Showing 47 changed files with 4,073 additions and 34 deletions.
79 changes: 52 additions & 27 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ $(GOPATH)/bin/go-bindata:
GOBIN=$(GOPATH)/bin go get github.com/jteeuwen/go-bindata/...

.PHONY: cross
cross: out/localkube out/minikube-linux-amd64 out/minikube-darwin-amd64 out/minikube-windows-amd64.exe
cross: out/localkube out/minikube-linux-amd64 out/minikube-darwin-amd64 out/minikube-windows-amd64.exe out/docker-machine-driver-hyperkit

.PHONY: checksum
checksum:
Expand Down Expand Up @@ -208,11 +208,15 @@ out/minikube-installer.exe: out/minikube-windows-amd64.exe
rm -rf out/windows_tmp

out/docker-machine-driver-hyperkit:
go build -o $(BUILD_DIR)/hyperkit k8s.io/minikube/cmd/drivers/hyperkit
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
$(MINIKUBE_DOCKER_CMD) '$(MINIKUBE_ENV_darwin_DOCKER) $(MINIKUBE_ENV_darwin) go build -o $(BUILD_DIR)/docker-machine-driver-hyperkit k8s.io/minikube/cmd/drivers/hyperkit'
else
$(MINIKUBE_ENV_darwin) go build -o $(BUILD_DIR)/docker-machine-driver-hyperkit k8s.io/minikube/cmd/drivers/hyperkit
endif

.PHONY: install-hyperkit-driver
install-hyperkit-driver: out/docker-machine-driver-hyperkit
sudo cp out/hyperkit $(HOME)/bin/docker-machine-driver-hyperkit
sudo cp out/docker-machine-driver-hyperkit $(HOME)/bin/docker-machine-driver-hyperkit
sudo chown root:wheel $(HOME)/bin/docker-machine-driver-hyperkit
sudo chmod u+s $(HOME)/bin/docker-machine-driver-hyperkit

Expand Down
10 changes: 10 additions & 0 deletions hack/jenkins/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@
# Copy only the files we need to this workspace
mkdir -p out/ testdata/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/minikube-${OS_ARCH} out/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/docker-machine-driver-* out/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/e2e-${OS_ARCH} out/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/busybox.yaml testdata/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/pvc.yaml testdata/
gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/busybox-mount-test.yaml testdata/

# Add the out/ directory to the PATH, for using new drivers.
export PATH=$PATH:"$(pwd)/out/"

# Linux cleanup
virsh -c qemu:///system list --all \
| sed -n '3,$ p' \
Expand Down Expand Up @@ -59,6 +63,12 @@ pgrep xhyve | xargs kill || true
# Set the executable bit on the e2e binary and out binary
chmod +x out/e2e-${OS_ARCH}
chmod +x out/minikube-${OS_ARCH}
chmod +x out/docker-machine-driver-*

if [ -e out/docker-machine-driver-xhyve ]; then
sudo chown root:wheel out/docker-machine-driver-xhyve
sudo chmod u+s out/docker-machine-driver-xhyve
fi

MINIKUBE_WANTREPORTERRORPROMPT=False sudo ./out/minikube-${OS_ARCH} delete \
|| MINIKUBE_WANTREPORTERRORPROMPT=False ./out/minikube-${OS_ARCH} delete \
Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/minikube_cross_build_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -e

# Clean up exited containers
docker rm $(docker ps -q -f status=exited)
docker rm $(docker ps -q -f status=exited) || true

gsutil cp gs://minikube-builds/logs/index.html gs://minikube-builds/logs/${ghprbPullId}/index.html

Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/minikube_set_pending.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
set -e
set +x

for job in "OSX-Virtualbox" "OSX-XHyve" "Linux-Virtualbox" "Linux-KVM" "Linux-KVM-Alt" "Linux-None" "Windows-HyperV"; do
for job in "OSX-Virtualbox" "OSX-XHyve" "OSX-Hyperkit" "Linux-Virtualbox" "Linux-KVM" "Linux-KVM-Alt" "Linux-None" "Windows-HyperV"; do
target_url="https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${job}.txt"
curl "https://api.github.com/repos/kubernetes/minikube/statuses/${ghprbActualCommit}?access_token=$access_token" \
-H "Content-Type: application/json" \
Expand Down
35 changes: 35 additions & 0 deletions hack/jenkins/osx_integration_tests_hyperkit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# This script runs the integration tests on an OSX machine for the Hyperkit Driver

# The script expects the following env variables:
# MINIKUBE_LOCATION: GIT_COMMIT from upstream build.
# COMMIT: Actual commit ID from upstream build
# EXTRA_BUILD_ARGS (optional): Extra args to be passed into the minikube integrations tests
# access_token: The Github API access token. Injected by the Jenkins credential provider.


set -e

OS_ARCH="darwin-amd64"
VM_DRIVER="hyperkit"
JOB_NAME="OSX-Hyperkit"


# Download files and set permissions
source common.sh
1 change: 1 addition & 0 deletions hack/jenkins/print-debug-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ journalctl -u localkube -n 500
${SUDO_PREFIX}cat $KUBECONFIG

cat $HOME/.kube/config
echo $PATH

docker ps

Expand Down
4 changes: 4 additions & 0 deletions pkg/minikube/cluster/cluster_non_darwin_panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ func createVMwareFusionHost(config MachineConfig) drivers.Driver {
func createXhyveHost(config MachineConfig) drivers.Driver {
panic("xhyve not supported")
}

func createHyperkitHost(config MachineConfig) drivers.Driver {
panic("hyperkit not supported")
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2ac1dd6

Please sign in to comment.