File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ set -o errexit
7
7
: " ${KUBECONFIG:? } "
8
8
: " ${TEST_NAMESPACE:? } "
9
9
: " ${TEST_ARTIFACTS_DIR:? } "
10
+ : " ${KUBECTL:= kubectl} "
10
11
12
+ echo " Using the ${KUBECTL} kubectl binary"
13
+ echo " Using the ${TEST_ARTIFACTS_DIR} output directory"
11
14
mkdir -p " ${TEST_ARTIFACTS_DIR} "
12
15
13
16
commands=()
@@ -23,5 +26,5 @@ echo "Storing the test artifact output in the ${TEST_ARTIFACTS_DIR} directory"
23
26
for command in " ${commands[@]} " ; do
24
27
echo " Collecting ${command} output..."
25
28
COMMAND_OUTPUT_FILE=${TEST_ARTIFACTS_DIR} /${command// / _}
26
- kubectl -n ${TEST_NAMESPACE} ${command} >> " ${COMMAND_OUTPUT_FILE} "
29
+ ${KUBECTL} -n ${TEST_NAMESPACE} ${command} >> " ${COMMAND_OUTPUT_FILE} "
27
30
done
Original file line number Diff line number Diff line change @@ -132,6 +132,10 @@ func (ctx TestContext) DumpNamespaceArtifacts(namespace string) error {
132
132
"TEST_ARTIFACTS_DIR=" + logDir ,
133
133
"KUBECONFIG=" + kubeconfigPath ,
134
134
}
135
+ kubectl := os .Getenv ("KUBECTL" )
136
+ if kubectl != "" {
137
+ envvars = append (envvars , fmt .Sprintf ("KUBECTL=%s" , kubectl ))
138
+ }
135
139
136
140
cmd := exec .Command (ctx .artifactsScriptPath )
137
141
cmd .Env = append (cmd .Env , envvars ... )
You can’t perform that action at this time.
0 commit comments