From 4b389783298204ff028c31803f15a8e38533c9a9 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Sun, 24 Feb 2019 22:56:39 -0500 Subject: [PATCH] fix shellcheck in test/e2e_node/jenkins/... update pull request --- hack/.shellcheck_failures | 4 ---- test/e2e_node/jenkins/conformance/conformance-jenkins.sh | 4 ++-- test/e2e_node/jenkins/copy-e2e-image.sh | 8 ++++---- test/e2e_node/jenkins/e2e-node-jenkins.sh | 4 ++-- test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index 64d0a1d99b0..6e2a3eefaf4 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -136,10 +136,6 @@ ./test/e2e_node/conformance/run_test.sh ./test/e2e_node/environment/setup_host.sh ./test/e2e_node/gubernator.sh -./test/e2e_node/jenkins/conformance/conformance-jenkins.sh -./test/e2e_node/jenkins/copy-e2e-image.sh -./test/e2e_node/jenkins/e2e-node-jenkins.sh -./test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh ./test/images/image-util.sh ./test/images/pets/redis-installer/on-start.sh ./test/images/pets/zookeeper-installer/install.sh diff --git a/test/e2e_node/jenkins/conformance/conformance-jenkins.sh b/test/e2e_node/jenkins/conformance/conformance-jenkins.sh index 9e8715287cf..d4902eb5196 100755 --- a/test/e2e_node/jenkins/conformance/conformance-jenkins.sh +++ b/test/e2e_node/jenkins/conformance/conformance-jenkins.sh @@ -22,7 +22,7 @@ set -x : "${1:?Usage test/e2e_node/jenkins/conformance-node-jenkins.sh }" -. $1 +. "${1}" make generated_files @@ -30,7 +30,7 @@ WORKSPACE=${WORKSPACE:-"/tmp/"} ARTIFACTS=${WORKSPACE}/_artifacts TIMEOUT=${TIMEOUT:-"45m"} -mkdir -p ${ARTIFACTS} +mkdir -p "${ARTIFACTS}" go run test/e2e_node/runner/remote/run_remote.go --test-suite=conformance \ --logtostderr --vmodule=*=4 --ssh-env="gce" --ssh-user="$GCE_USER" \ diff --git a/test/e2e_node/jenkins/copy-e2e-image.sh b/test/e2e_node/jenkins/copy-e2e-image.sh index 18ff7c6310b..8d1db0bea36 100755 --- a/test/e2e_node/jenkins/copy-e2e-image.sh +++ b/test/e2e_node/jenkins/copy-e2e-image.sh @@ -37,8 +37,8 @@ TO_PROJECT=$3 TO_IMAGE=$4 echo "Copying image $FROM_IMAGE from project $FROM_PROJECT to project $TO_PROJECT as image $TO_IMAGE..." -gcloud compute --project $TO_PROJECT disks create $TO_IMAGE --image=https://www.googleapis.com/compute/v1/projects/$FROM_PROJECT/global/images/$FROM_IMAGE -gcloud compute --project $TO_PROJECT images create $TO_IMAGE \ - --source-disk=$TO_IMAGE \ +gcloud compute --project "${TO_PROJECT}" disks create "${TO_IMAGE}" --image=https://www.googleapis.com/compute/v1/projects/"${FROM_PROJECT}/global/images/""${FROM_IMAGE}" +gcloud compute --project "${TO_PROJECT}" images create "${TO_IMAGE}" \ + --source-disk="${TO_IMAGE}" \ --description="Cloned from projects/$2/global/images/$1 by $USER on $(date)" -gcloud -q compute --project $TO_PROJECT disks delete $TO_IMAGE +gcloud -q compute --project "${TO_PROJECT}" disks delete "${TO_IMAGE}" diff --git a/test/e2e_node/jenkins/e2e-node-jenkins.sh b/test/e2e_node/jenkins/e2e-node-jenkins.sh index a1caae4ad95..f110e8d9a49 100755 --- a/test/e2e_node/jenkins/e2e-node-jenkins.sh +++ b/test/e2e_node/jenkins/e2e-node-jenkins.sh @@ -26,7 +26,7 @@ set -x : "${1:?Usage test/e2e_node/jenkins/e2e-node-jenkins.sh }" -. $1 +. "${1}" # indirectly generates test/e2e/generated/bindata.go too make generated_files @@ -39,7 +39,7 @@ WORKSPACE=${WORKSPACE:-"/tmp/"} ARTIFACTS=${WORKSPACE}/_artifacts TIMEOUT=${TIMEOUT:-"45m"} -mkdir -p ${ARTIFACTS} +mkdir -p "${ARTIFACTS}" go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 \ --ssh-env="gce" --ssh-user="$GCE_USER" --zone="$GCE_ZONE" --project="$GCE_PROJECT" \ diff --git a/test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh b/test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh index f83e53c18ec..f74af9a98fe 100644 --- a/test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh +++ b/test/e2e_node/jenkins/ubuntu-14.04-nvidia-install.sh @@ -23,7 +23,7 @@ if ! dpkg-query -W cuda; then dpkg -i ./cuda-repo-ubuntu1404_8.0.61-1_amd64.deb apt-get update apt-get install cuda -y - apt-get install linux-headers-$(uname -r) -y + apt-get install "linux-headers-$(uname -r)" -y fi ## Pre-loads kernel modules nvidia-smi