diff --git a/hack/jenkins/cloud_shell_functional_tests_docker.sh b/hack/jenkins/cloud_shell_functional_tests_docker.sh new file mode 100755 index 0000000000000000000000000000000000000000..9a9ec62d79c88409b7cf9fda25bedf6491b5046f --- /dev/null +++ b/hack/jenkins/cloud_shell_functional_tests_docker.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright 2019 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 functional and addon tests on Cloud Shell + +# 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 -ex + +gcloud cloud-shell ssh --authorize-session << EOF + OS_ARCH="linux-amd64" + VM_DRIVER="docker" + JOB_NAME="Docker_Cloud_Shell" + CONTAINER_RUNTIME="docker" + EXTRA_TEST_ARGS="-test.run (TestFunctional|TestAddons)" + + # Need to set these in cloud-shell or will not be present in common.sh + MINIKUBE_LOCATION=$MINIKUBE_LOCATION + COMMIT=$COMMIT + EXTRA_BUILD_ARGS=$EXTRA_BUILD_ARGS + access_token=$access_token + + # Prevent cloud-shell is ephemeral warnings on apt-get + touch ~/.cloudshell/no-apt-get-warning + + gsutil -m cp -r gs://minikube-builds/${MINIKUBE_LOCATION}/installers . + chmod +x ./installers/*.sh + gsutil -m cp -r gs://minikube-builds/${MINIKUBE_LOCATION}/common.sh . + chmod +x ./common.sh + source ./common.sh +EOF diff --git a/hack/jenkins/minikube_set_pending.sh b/hack/jenkins/minikube_set_pending.sh index 923d58cd06078590fd567ade5c737fec4f553b60..701c070f8155cbd038bf4e3afcaa30e5faf298be 100755 --- a/hack/jenkins/minikube_set_pending.sh +++ b/hack/jenkins/minikube_set_pending.sh @@ -51,6 +51,7 @@ jobs=( # 'Docker_macOS' 'Docker_Windows' # 'Podman_Linux' + 'Docker_Cloud_Shell' ) # retry_github_status provides reliable github status updates