Skip to content

Commit

Permalink
cluster: move logging library to hack/
Browse files Browse the repository at this point in the history
it's used once in cluster and used a bunch in hack/ and build/
  • Loading branch information
mikedanese committed Jan 14, 2018
1 parent 32dc504 commit 1e2b644
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 37 deletions.
4 changes: 0 additions & 4 deletions cluster/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ filegroup(
"//cluster/images/etcd/rollback:all-srcs",
"//cluster/images/hyperkube:all-srcs",
"//cluster/images/kubemark:all-srcs",
"//cluster/lib:all-srcs",
"//cluster/saltbase:all-srcs",
],
tags = ["automanaged"],
Expand Down Expand Up @@ -55,7 +54,6 @@ sh_test(
name = "common_test",
srcs = ["common.sh"],
deps = [
"//cluster/lib",
"//hack/lib",
],
)
Expand All @@ -64,7 +62,6 @@ sh_test(
name = "clientbin_test",
srcs = ["clientbin.sh"],
deps = [
"//cluster/lib",
"//hack/lib",
],
)
Expand All @@ -73,7 +70,6 @@ sh_test(
name = "kube-util_test",
srcs = ["kube-util.sh"],
deps = [
"//cluster/lib",
"//hack/lib",
],
)
3 changes: 1 addition & 2 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ KUBE_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
DEFAULT_KUBECONFIG="${HOME:-.}/.kube/config"

source "${KUBE_ROOT}/hack/lib/util.sh"
source "${KUBE_ROOT}/cluster/lib/logging.sh"
# KUBE_RELEASE_VERSION_REGEX matches things like "v1.2.3" or "v1.2.3-alpha.4"
#
# NOTE This must match the version_regex in build/common.sh
Expand Down Expand Up @@ -499,7 +498,7 @@ function stage-images() {
done

kube::util::wait-for-jobs || {
kube::log::error "unable to push images. See ${temp_dir}/*.log for more info."
echo "!!! unable to push images. See ${temp_dir}/*.log for more info." 1>&2
return 1
}

Expand Down
25 changes: 0 additions & 25 deletions cluster/lib/BUILD

This file was deleted.

2 changes: 1 addition & 1 deletion hack/generate-bindata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ -z "${KUBE_ROOT:-}" ]]; then
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
fi

source "${KUBE_ROOT}/cluster/lib/logging.sh"
source "${KUBE_ROOT}/hack/lib/logging.sh"

if [[ ! -d "${KUBE_ROOT}/examples" ]]; then
echo "${KUBE_ROOT}/examples not detected. This script should be run from a location where the source dirs are available."
Expand Down
4 changes: 1 addition & 3 deletions hack/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ sh_library(
"etcd.sh",
"golang.sh",
"init.sh",
"logging.sh",
"swagger.sh",
"test.sh",
"util.sh",
"version.sh",
],
deps = [
"//cluster/lib",
],
)

filegroup(
Expand Down
2 changes: 1 addition & 1 deletion hack/lib/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export no_proxy=127.0.0.1,localhost
THIS_PLATFORM_BIN="${KUBE_ROOT}/_output/bin"

source "${KUBE_ROOT}/hack/lib/util.sh"
source "${KUBE_ROOT}/cluster/lib/logging.sh"
source "${KUBE_ROOT}/hack/lib/logging.sh"

kube::log::install_errexit

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/e2e_node/gubernator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -o errexit
set -o nounset
set -o pipefail

source cluster/lib/logging.sh
source hack/lib/logging.sh


if [[ $# -eq 0 || ! $1 =~ ^[Yy]$ ]]; then
Expand Down

0 comments on commit 1e2b644

Please sign in to comment.