mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 18:52:38 +00:00
Set shell options for reliability.
Tweak a few other small things in our shell scripts.
This commit is contained in:
@@ -46,18 +46,20 @@ function kube::build::make_binary() {
|
||||
}
|
||||
|
||||
function kube::build::make_binaries() {
|
||||
if [[ ${#targets[@]} -eq 0 ]]; then
|
||||
targets=(
|
||||
cmd/proxy
|
||||
cmd/apiserver
|
||||
cmd/controller-manager
|
||||
cmd/kubelet
|
||||
cmd/kubecfg
|
||||
plugin/cmd/scheduler
|
||||
)
|
||||
local -a targets=(
|
||||
cmd/proxy
|
||||
cmd/apiserver
|
||||
cmd/controller-manager
|
||||
cmd/kubelet
|
||||
cmd/kubecfg
|
||||
plugin/cmd/scheduler
|
||||
)
|
||||
|
||||
if [[ -n "${1-}" ]]; then
|
||||
targets=("$1")
|
||||
fi
|
||||
|
||||
binaries=()
|
||||
local -a binaries=()
|
||||
local target
|
||||
for target in "${targets[@]}"; do
|
||||
binaries+=("${KUBE_GO_PACKAGE}/${target}")
|
||||
@@ -66,11 +68,6 @@ function kube::build::make_binaries() {
|
||||
ARCH_TARGET="${KUBE_TARGET}/${GOOS}/${GOARCH}"
|
||||
mkdir -p "${ARCH_TARGET}"
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
kube::build::make_binary "$1"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local b
|
||||
for b in "${binaries[@]}"; do
|
||||
kube::build::make_binary "$b"
|
||||
|
@@ -14,7 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
@@ -14,7 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
@@ -14,7 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
@@ -14,14 +14,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
||||
echo "+++ Running unit tests"
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
if [[ -n "${1-}" ]]; then
|
||||
godep go test -cover -coverprofile=tmp.out "$KUBE_GO_PACKAGE/$1"
|
||||
exit 0
|
||||
fi
|
||||
|
Reference in New Issue
Block a user