mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Bash script syntax improvements
This commit is contained in:
@@ -30,7 +30,7 @@ set -o xtrace
|
||||
# is an incoming variable Jenkins provides us for this job's scratch
|
||||
# space.
|
||||
export HOME=${WORKSPACE} # Nothing should want Jenkins $HOME
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
export PATH=${PATH}:/usr/local/go/bin
|
||||
|
||||
# Skip gcloud update checking
|
||||
export CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK=true
|
||||
|
@@ -28,7 +28,7 @@ set -o xtrace
|
||||
# space.
|
||||
export HOME=${WORKSPACE} # Nothing should want Jenkins $HOME
|
||||
export GOPATH=${HOME}/_gopath
|
||||
export PATH=${GOPATH}/bin:${HOME}/third_party/etcd:/usr/local/go/bin:$PATH
|
||||
export PATH=${GOPATH}/bin:${HOME}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
|
||||
# Install a few things needed by unit and /integration tests.
|
||||
command -v etcd &>/dev/null || ./hack/install-etcd.sh
|
||||
|
@@ -139,9 +139,9 @@ function print_started() {
|
||||
# will be available as started["metadata"][KEY.lower()].
|
||||
echo " \"metadata\": {"
|
||||
local sep="" # leading commas are easy to track
|
||||
for env_var in $metadata_keys; do
|
||||
for env_var in ${metadata_keys}; do
|
||||
local var_upper="${env_var#BUILD_METADATA_}"
|
||||
echo " $sep\"${var_upper,,}\": \"${!env_var}\""
|
||||
echo " ${sep}\"${var_upper,,}\": \"${!env_var}\""
|
||||
sep=","
|
||||
done
|
||||
echo " },"
|
||||
|
@@ -21,7 +21,7 @@ set -o xtrace
|
||||
|
||||
retry() {
|
||||
for i in {1..5}; do
|
||||
"$@" && return 0 || sleep $i
|
||||
"$@" && return 0 || sleep "${i}"
|
||||
done
|
||||
"$@"
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ set -o xtrace
|
||||
# space.
|
||||
export HOME=${WORKSPACE} # Nothing should want Jenkins $HOME
|
||||
export GOPATH=${HOME}/_gopath
|
||||
export PATH=${GOPATH}/bin:${HOME}/third_party/etcd:/usr/local/go/bin:$PATH
|
||||
export PATH=${GOPATH}/bin:${HOME}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
|
||||
# Install a few things needed by the verification tests.
|
||||
command -v etcd &>/dev/null || ./hack/install-etcd.sh
|
||||
|
Reference in New Issue
Block a user