minikube/hack/jenkins/linux_integration_tests_non...

56 lines
1.8 KiB
Bash
Raw Normal View History

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.
# 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"
JOB_NAME="none_Linux"
2017-12-21 21:28:55 +00:00
EXTRA_ARGS="--bootstrapper=kubeadm"
PARALLEL_COUNT=1
2019-10-24 04:15:33 +00:00
EXPECTED_DEFAULT_DRIVER="kvm2"
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
# "none" driver specific cleanup from previous runs.
# Try without -f first, primarily because older kubeadm versions (v1.10) don't support it anyways.
sudo kubeadm reset || sudo kubeadm reset -f || true
# Cleanup data directory
sudo rm -rf /data/*
# 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-05-10 20:26:05 +00:00
# Download files and set permissions
2018-09-26 22:38:41 +00:00
source ./common.sh