Skip to content

Commit 289ba72

Browse files
author
Yongkun Anfernee Gui
committed
Add integration test scripts for VMware
1 parent 44ef6c2 commit 289ba72

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Copyright 2016 The Kubernetes Authors All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
# This script runs the integration tests on a Linux machine for the Virtualbox Driver
19+
20+
# The script expects the following env variables:
21+
# MINIKUBE_LOCATION: GIT_COMMIT from upstream build.
22+
# COMMIT: Actual commit ID from upstream build
23+
# EXTRA_BUILD_ARGS (optional): Extra args to be passed into the minikube integrations tests
24+
# access_token: The Github API access token. Injected by the Jenkins credential provider.
25+
26+
set -e
27+
28+
OS_ARCH="linux-amd64"
29+
VM_DRIVER="vmware"
30+
JOB_NAME="Linux-VMware"
31+
EXTRA_ARGS="--bootstrapper=localkube"
32+
EXTRA_START_ARGS="--kubernetes-version=file://$PWD/out/localkube"
33+
34+
# Download files and set permissions
35+
source common.sh
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Copyright 2016 The Kubernetes Authors All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
# This script runs the integration tests on an OSX machine for the Virtualbox Driver
19+
20+
# The script expects the following env variables:
21+
# MINIKUBE_LOCATION: GIT_COMMIT from upstream build.
22+
# COMMIT: Actual commit ID from upstream build
23+
# EXTRA_BUILD_ARGS (optional): Extra args to be passed into the minikube integrations tests
24+
# access_token: The Github API access token. Injected by the Jenkins credential provider.
25+
26+
27+
set -e
28+
OS_ARCH="darwin-amd64"
29+
VM_DRIVER="vmware"
30+
JOB_NAME="OSX-VMware"
31+
EXTRA_ARGS="--bootstrapper=localkube"
32+
EXTRA_START_ARGS="--kubernetes-version=file://$PWD/out/localkube"
33+
34+
# Download files and set permissions
35+
source common.sh
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2016 The Kubernetes Authors All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
mkdir -p out
16+
gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/minikube-windows-amd64.exe out/
17+
gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/localkube out/
18+
gsutil.cmd cp gs://minikube-builds/$env:MINIKUBE_LOCATION/e2e-windows-amd64.exe out/
19+
gsutil.cmd cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata .
20+
21+
./out/minikube-windows-amd64.exe delete
22+
Remove-Item -Recurse -Force C:\Users\jenkins\.minikube
23+
24+
out/e2e-windows-amd64.exe -minikube-start-args="--vm-driver=vmware --kubernetes-version=https://storage.googleapis.com/minikube-builds/$env:MINIKUBE_LOCATION/localkube" -minikube-args="--v=10 --logtostderr" -binary=out/minikube-windows-amd64.exe -test.v -test.timeout=30m
25+
$env:result=$lastexitcode
26+
# If the last exit code was 0->success, x>0->error
27+
If($env:result -eq 0){$env:status="success"}
28+
Else {$env:status="failure"}
29+
30+
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Windows-vmware.txt"
31+
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Windows-vmware`"}"
32+
Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing
33+
34+
Exit $env:result

0 commit comments

Comments
 (0)