mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 11:12:03 +00:00
Standardize how we refer to the kubernetes root.
Now use $KUBE_ROOT as the variable pretty much everywhere.
This commit is contained in:
@@ -17,9 +17,10 @@
|
||||
# This script sets up a go workspace locally and builds all go components.
|
||||
# You can 'source' this file if you want to set up GOPATH in your local shell.
|
||||
|
||||
cd $(dirname "${BASH_SOURCE}")/../.. >/dev/null
|
||||
readonly KUBE_REPO_ROOT="${PWD}"
|
||||
readonly KUBE_TARGET="${KUBE_REPO_ROOT}/_output/build"
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
cd "${KUBE_ROOT}"
|
||||
|
||||
readonly KUBE_TARGET="${KUBE_ROOT}/_output/build"
|
||||
readonly KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes
|
||||
|
||||
mkdir -p "${KUBE_TARGET}"
|
||||
@@ -39,7 +40,7 @@ function kube::build::make_binary() {
|
||||
local -r bin=${gopkg##*/}
|
||||
|
||||
echo "+++ Building ${bin} for ${GOOS}/${GOARCH}"
|
||||
pushd "${KUBE_REPO_ROOT}" >/dev/null
|
||||
pushd "${KUBE_ROOT}" >/dev/null
|
||||
godep go build -ldflags "${KUBE_LD_FLAGS-}" -o "${ARCH_TARGET}/${bin}" "${gopkg}"
|
||||
popd >/dev/null
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
||||
kube::build::make_binaries "$@"
|
||||
|
@@ -16,7 +16,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
||||
readonly CROSS_BINARIES=(
|
||||
./cmd/kubecfg
|
||||
|
@@ -16,20 +16,21 @@
|
||||
|
||||
set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
||||
kube::build::make_binaries "./cmd/integration"
|
||||
|
||||
readonly ETCD_DIR="${KUBE_REPO_ROOT}/_output/etcd"
|
||||
readonly ETCD_DIR="${KUBE_ROOT}/_output/etcd"
|
||||
mkdir -p "${ETCD_DIR}"
|
||||
|
||||
echo "+++ Running integration test"
|
||||
|
||||
etcd -name test -data-dir ${ETCD_DIR} > "${KUBE_REPO_ROOT}/_output/etcd.log" &
|
||||
etcd -name test -data-dir ${ETCD_DIR} > "${KUBE_ROOT}/_output/etcd.log" &
|
||||
readonly ETCD_PID=$!
|
||||
|
||||
sleep 5
|
||||
|
||||
${KUBE_TARGET}/linux/amd64/integration
|
||||
"${KUBE_TARGET}/linux/amd64/integration"
|
||||
|
||||
kill $ETCD_PID
|
||||
|
@@ -16,7 +16,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/build/build-image/common.sh"
|
||||
|
||||
echo "+++ Running unit tests"
|
||||
|
||||
|
Reference in New Issue
Block a user