Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e8f28b55
Unverified
Commit
e8f28b55
authored
Apr 24, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76937 from xichengliudui/fixshellcheckfailures-34
Fix shellcheck failures on ginkgo-e2e.sh
parents
e4a57b77
2fb859db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
ginkgo-e2e.sh
hack/ginkgo-e2e.sh
+14
-11
No files found.
hack/.shellcheck_failures
View file @
e8f28b55
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
./cluster/restore-from-backup.sh
./cluster/restore-from-backup.sh
./cluster/test-e2e.sh
./cluster/test-e2e.sh
./cluster/validate-cluster.sh
./cluster/validate-cluster.sh
./hack/ginkgo-e2e.sh
./hack/lib/init.sh
./hack/lib/init.sh
./hack/lib/swagger.sh
./hack/lib/swagger.sh
./hack/lib/test.sh
./hack/lib/test.sh
...
...
hack/ginkgo-e2e.sh
View file @
e8f28b55
...
@@ -18,7 +18,7 @@ set -o errexit
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
source
"
${
KUBE_ROOT
}
/cluster/common.sh"
source
"
${
KUBE_ROOT
}
/cluster/common.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
...
@@ -38,8 +38,8 @@ GINKGO_NO_COLOR=${GINKGO_NO_COLOR:-n}
...
@@ -38,8 +38,8 @@ GINKGO_NO_COLOR=${GINKGO_NO_COLOR:-n}
# If 'y', will rerun failed tests once to give them a second chance.
# If 'y', will rerun failed tests once to give them a second chance.
GINKGO_TOLERATE_FLAKES
=
${
GINKGO_TOLERATE_FLAKES
:-
n
}
GINKGO_TOLERATE_FLAKES
=
${
GINKGO_TOLERATE_FLAKES
:-
n
}
:
${
KUBECTL
:
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
}
:
"
${
KUBECTL
:
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
}
"
:
${
KUBE_CONFIG_FILE
:
=
"config-test.sh"
}
:
"
${
KUBE_CONFIG_FILE
:
=
"config-test.sh"
}
"
export
KUBECTL KUBE_CONFIG_FILE
export
KUBECTL KUBE_CONFIG_FILE
...
@@ -48,11 +48,13 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
...
@@ -48,11 +48,13 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
function
detect-master-from-kubeconfig
()
{
function
detect-master-from-kubeconfig
()
{
export
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
export
KUBECONFIG
=
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
}
local
cc
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.current-context}"
)
local
cc
if
[[
!
-z
"
${
KUBE_CONTEXT
:-}
"
]]
;
then
cc
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.current-context}"
)
if
[[
-n
"
${
KUBE_CONTEXT
:-}
"
]]
;
then
cc
=
"
${
KUBE_CONTEXT
}
"
cc
=
"
${
KUBE_CONTEXT
}
"
fi
fi
local
cluster
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.contexts[?(@.name ==
\"
${
cc
}
\"
)].context.cluster}"
)
local
cluster
cluster
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.contexts[?(@.name ==
\"
${
cc
}
\"
)].context.cluster}"
)
KUBE_MASTER_URL
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.clusters[?(@.name ==
\"
${
cluster
}
\"
)].cluster.server}"
)
KUBE_MASTER_URL
=
$(
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
config view
-o
jsonpath
=
"{.clusters[?(@.name ==
\"
${
cluster
}
\"
)].cluster.server}"
)
}
}
...
@@ -86,8 +88,8 @@ fi
...
@@ -86,8 +88,8 @@ fi
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gce"
]]
;
then
set_num_migs
set_num_migs
NODE_INSTANCE_GROUP
=
""
NODE_INSTANCE_GROUP
=
""
for
((
i
=
1
;
i<
=
${
NUM_MIGS
}
;
i++
))
;
do
for
((
i
=
1
;
i<
=
NUM_MIGS
;
i++
))
;
do
if
[[
${
i
}
==
${
NUM_MIGS
}
]]
;
then
if
[[
${
i
}
==
"
${
NUM_MIGS
}
"
]]
;
then
# We are assigning the same mig names as create-nodes function from cluster/gce/util.sh.
# We are assigning the same mig names as create-nodes function from cluster/gce/util.sh.
NODE_INSTANCE_GROUP
=
"
${
NODE_INSTANCE_GROUP
}${
NODE_INSTANCE_PREFIX
}
-group"
NODE_INSTANCE_GROUP
=
"
${
NODE_INSTANCE_GROUP
}${
NODE_INSTANCE_PREFIX
}
-group"
else
else
...
@@ -101,7 +103,7 @@ fi
...
@@ -101,7 +103,7 @@ fi
# KUBERNETES_CONFORMANCE_PROVIDER is set to "gke".
# KUBERNETES_CONFORMANCE_PROVIDER is set to "gke".
if
[[
-z
"
${
NODE_INSTANCE_GROUP
:-}
"
]]
&&
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
if
[[
-z
"
${
NODE_INSTANCE_GROUP
:-}
"
]]
&&
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"gke"
]]
;
then
detect-node-instance-groups
detect-node-instance-groups
NODE_INSTANCE_GROUP
=
$(
kube::util::join ,
"
${
NODE_INSTANCE_GROUP
S
[@]
}
"
)
NODE_INSTANCE_GROUP
=
$(
kube::util::join ,
"
${
NODE_INSTANCE_GROUP
[@]
}
"
)
fi
fi
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"azure"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"azure"
]]
;
then
...
@@ -138,8 +140,9 @@ fi
...
@@ -138,8 +140,9 @@ fi
# The --host setting is used only when providing --auth_config
# The --host setting is used only when providing --auth_config
# If --kubeconfig is used, the host to use is retrieved from the .kubeconfig
# If --kubeconfig is used, the host to use is retrieved from the .kubeconfig
# file and the one provided with --host is ignored.
# file and the one provided with --host is ignored.
# Add path for things like running kubectl binary.
# Add path for things like running kubectl binary.
export
PATH
=
$(
dirname
"
${
e2e_test
}
"
)
:
"
${
PATH
}
"
PATH
=
$(
dirname
"
${
e2e_test
}
"
)
:
"
${
PATH
}
"
export
PATH
"
${
ginkgo
}
"
"
${
ginkgo_args
[@]
:+
${
ginkgo_args
[@]
}}
"
"
${
e2e_test
}
"
--
\
"
${
ginkgo
}
"
"
${
ginkgo_args
[@]
:+
${
ginkgo_args
[@]
}}
"
"
${
e2e_test
}
"
--
\
"
${
auth_config
[@]
:+
${
auth_config
[@]
}}
"
\
"
${
auth_config
[@]
:+
${
auth_config
[@]
}}
"
\
--ginkgo
.flakeAttempts
=
"
${
FLAKE_ATTEMPTS
}
"
\
--ginkgo
.flakeAttempts
=
"
${
FLAKE_ATTEMPTS
}
"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment