mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Move the image and host related logic only to be run in remote mode.
This commit is contained in:
parent
295f1786fb
commit
4c9587bf61
@ -29,29 +29,9 @@ parallelism=${PARALLELISM:-8}
|
|||||||
report=${REPORT:-"/tmp/"}
|
report=${REPORT:-"/tmp/"}
|
||||||
artifacts=${ARTIFACTS:-"/tmp/_artifacts"}
|
artifacts=${ARTIFACTS:-"/tmp/_artifacts"}
|
||||||
remote=${REMOTE:-"false"}
|
remote=${REMOTE:-"false"}
|
||||||
images=${IMAGES:-""}
|
|
||||||
hosts=${HOSTS:-""}
|
|
||||||
metadata=${INSTANCE_METADATA:-""}
|
|
||||||
gubernator=${GUBERNATOR:-"false"}
|
|
||||||
if [[ $hosts == "" && $images == "" ]]; then
|
|
||||||
gci_image=$(gcloud compute images list --project google-containers \
|
|
||||||
--no-standard-images --regexp="gci-dev.*" --format="table[no-heading](name)")
|
|
||||||
images=$gci_image
|
|
||||||
metadata="user-data<${KUBE_ROOT}/test/e2e_node/jenkins/gci-init.yaml"
|
|
||||||
fi
|
|
||||||
image_project=${IMAGE_PROJECT:-"google-containers"}
|
|
||||||
instance_prefix=${INSTANCE_PREFIX:-"test"}
|
|
||||||
cleanup=${CLEANUP:-"true"}
|
|
||||||
delete_instances=${DELETE_INSTANCES:-"false"}
|
|
||||||
run_until_failure=${RUN_UNTIL_FAILURE:-"false"}
|
run_until_failure=${RUN_UNTIL_FAILURE:-"false"}
|
||||||
list_images=${LIST_IMAGES:-"false"}
|
|
||||||
test_args=${TEST_ARGS:-""}
|
test_args=${TEST_ARGS:-""}
|
||||||
|
|
||||||
if [[ $list_images == "true" ]]; then
|
|
||||||
gcloud compute images list --project="${image_project}" | grep "e2e-node"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse the flags to pass to ginkgo
|
# Parse the flags to pass to ginkgo
|
||||||
ginkgoflags=""
|
ginkgoflags=""
|
||||||
if [[ $parallelism > 1 ]]; then
|
if [[ $parallelism > 1 ]]; then
|
||||||
@ -72,6 +52,28 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [ $remote = true ] ; then
|
if [ $remote = true ] ; then
|
||||||
|
# The following options are only valid in remote run.
|
||||||
|
images=${IMAGES:-""}
|
||||||
|
hosts=${HOSTS:-""}
|
||||||
|
image_project=${IMAGE_PROJECT:-"kubernetes-node-e2e-images"}
|
||||||
|
metadata=${INSTANCE_METADATA:-""}
|
||||||
|
list_images=${LIST_IMAGES:-false}
|
||||||
|
if [[ $list_images == "true" ]]; then
|
||||||
|
gcloud compute images list --project="${image_project}" | grep "e2e-node"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
gubernator=${GUBERNATOR:-"false"}
|
||||||
|
if [[ $hosts == "" && $images == "" ]]; then
|
||||||
|
image_project=${IMAGE_PROJECT:-"google-containers"}
|
||||||
|
gci_image=$(gcloud compute images list --project $image_project \
|
||||||
|
--no-standard-images --regexp="gci-dev.*" --format="table[no-heading](name)")
|
||||||
|
images=$gci_image
|
||||||
|
metadata="user-data<${KUBE_ROOT}/test/e2e_node/jenkins/gci-init.yaml"
|
||||||
|
fi
|
||||||
|
instance_prefix=${INSTANCE_PREFIX:-"test"}
|
||||||
|
cleanup=${CLEANUP:-"true"}
|
||||||
|
delete_instances=${DELETE_INSTANCES:-"false"}
|
||||||
|
|
||||||
# Setup the directory to copy test artifacts (logs, junit.xml, etc) from remote host to local host
|
# Setup the directory to copy test artifacts (logs, junit.xml, etc) from remote host to local host
|
||||||
if [[ $gubernator = true && -d "${artifacts}" ]]; then
|
if [[ $gubernator = true && -d "${artifacts}" ]]; then
|
||||||
echo "Removing artifacts directory at ${artifacts}"
|
echo "Removing artifacts directory at ${artifacts}"
|
||||||
|
@ -88,6 +88,9 @@ hack/local-up-cluster.sh: advertise_address="--advertise_address=${API_HO
|
|||||||
hack/local-up-cluster.sh: runtime_config="--runtime-config=${RUNTIME_CONFIG}"
|
hack/local-up-cluster.sh: runtime_config="--runtime-config=${RUNTIME_CONFIG}"
|
||||||
hack/local-up-cluster.sh: advertise_address=""
|
hack/local-up-cluster.sh: advertise_address=""
|
||||||
hack/local-up-cluster.sh: runtime_config=""
|
hack/local-up-cluster.sh: runtime_config=""
|
||||||
|
hack/make-rules/test-e2e-node.sh: image_project=${IMAGE_PROJECT:-"google-containers"}
|
||||||
|
hack/make-rules/test-e2e-node.sh: delete_instances=${DELETE_INSTANCES:-"false"}
|
||||||
|
hack/make-rules/test-e2e-node.sh: image_project=${IMAGE_PROJECT:-"kubernetes-node-e2e-images"}
|
||||||
hack/test-update-storage-objects.sh: local storage_backend=${1:-"${STORAGE_BACKEND_ETCD2}"}
|
hack/test-update-storage-objects.sh: local storage_backend=${1:-"${STORAGE_BACKEND_ETCD2}"}
|
||||||
hack/test-update-storage-objects.sh: local storage_media_type=${3:-""}
|
hack/test-update-storage-objects.sh: local storage_media_type=${3:-""}
|
||||||
hack/test-update-storage-objects.sh: local storage_versions=${2:-""}
|
hack/test-update-storage-objects.sh: local storage_versions=${2:-""}
|
||||||
|
Loading…
Reference in New Issue
Block a user