2017-02-22 03:27:51 +00:00
|
|
|
#!/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.
|
|
|
|
|
|
|
|
|
2019-08-06 23:33:04 +00:00
|
|
|
# This script runs the integration tests on a Linux machine for the none Driver
|
2017-02-22 03:27:51 +00:00
|
|
|
|
|
|
|
# The script expects the following env variables:
|
2017-05-10 20:26:05 +00:00
|
|
|
# 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.
|
|
|
|
|
2017-02-22 03:27:51 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
OS_ARCH="linux-amd64"
|
|
|
|
VM_DRIVER="none"
|
2019-08-06 23:33:04 +00:00
|
|
|
JOB_NAME="none_Linux"
|
2017-12-21 21:28:55 +00:00
|
|
|
EXTRA_ARGS="--bootstrapper=kubeadm"
|
2019-07-30 01:03:36 +00:00
|
|
|
PARALLEL_COUNT=1
|
2019-10-24 04:15:33 +00:00
|
|
|
EXPECTED_DEFAULT_DRIVER="kvm2"
|
2017-10-20 21:28:43 +00:00
|
|
|
|
2017-07-07 17:28:30 +00:00
|
|
|
SUDO_PREFIX="sudo -E "
|
|
|
|
export KUBECONFIG="/root/.kube/config"
|
2017-02-22 03:27:51 +00:00
|
|
|
|
2017-12-28 04:57:44 +00:00
|
|
|
# "none" driver specific cleanup from previous runs.
|
2018-12-14 22:10:39 +00:00
|
|
|
|
|
|
|
# Try without -f first, primarily because older kubeadm versions (v1.10) don't support it anyways.
|
|
|
|
sudo kubeadm reset || sudo kubeadm reset -f || true
|
2017-12-28 04:57:44 +00:00
|
|
|
# Cleanup data directory
|
|
|
|
sudo rm -rf /data/*
|
2018-12-04 21:37:31 +00:00
|
|
|
# Cleanup old Kubernetes configs
|
|
|
|
sudo rm -rf /etc/kubernetes/*
|
2019-02-15 04:20:49 +00:00
|
|
|
# Cleanup old minikube files
|
|
|
|
sudo rm -rf /var/lib/minikube/*
|
2018-12-03 20:46:58 +00:00
|
|
|
# Stop any leftover kubelets
|
|
|
|
systemctl is-active --quiet kubelet \
|
|
|
|
&& echo "stopping kubelet" \
|
|
|
|
&& sudo systemctl stop kubelet
|
2017-12-28 04:57:44 +00:00
|
|
|
|
2017-05-10 20:26:05 +00:00
|
|
|
# Download files and set permissions
|
2018-09-26 22:38:41 +00:00
|
|
|
source ./common.sh
|