Added scheduler binaries plus other misc fixes
* Support cleaning out built docker images * Use bash arrays in places * Lock etcd version we are testing against
This commit is contained in:
@@ -49,8 +49,13 @@ ENV GOPATH /go
|
||||
ENV GOOS linux
|
||||
ENV GOARCH amd64
|
||||
|
||||
# Get the code coverage tool and etcd for integration tests
|
||||
RUN go get code.google.com/p/go.tools/cmd/cover github.com/coreos/etcd github.com/tools/godep
|
||||
# Get the code coverage tool and godep
|
||||
RUN go get code.google.com/p/go.tools/cmd/cover github.com/tools/godep
|
||||
|
||||
RUN mkdir -p /go/src/github.com/coreos/etcd && \
|
||||
cd /go/src/github.com/coreos/etcd && \
|
||||
git clone https://github.com/coreos/etcd.git . -b v0.4.6 --depth=1 && \
|
||||
go install github.com/coreos/etcd
|
||||
|
||||
# Mark this as a kube-build container
|
||||
RUN touch /kube-build-image
|
||||
|
@@ -28,31 +28,44 @@ if [[ ! -f "/kube-build-image" ]]; then
|
||||
echo "WARNING: This script should be run in the kube-build conrtainer image!" >&2
|
||||
fi
|
||||
|
||||
function make-binary() {
|
||||
local -r gopkg=$1
|
||||
local -r bin=${gopkg##*/}
|
||||
|
||||
echo "+++ Building ${bin} for ${GOOS}/${GOARCH}"
|
||||
pushd "${KUBE_REPO_ROOT}"
|
||||
godep go build -o "${ARCH_TARGET}/${bin}" "${gopkg}"
|
||||
popd
|
||||
}
|
||||
|
||||
function make-binaries() {
|
||||
readonly BINARIES="
|
||||
proxy
|
||||
integration
|
||||
apiserver
|
||||
controller-manager
|
||||
kubelet
|
||||
kubecfg"
|
||||
if [[ ${#targets[@]} -eq 0 ]]; then
|
||||
targets=(
|
||||
cmd/proxy
|
||||
cmd/apiserver
|
||||
cmd/controller-manager
|
||||
cmd/kubelet
|
||||
cmd/kubecfg
|
||||
plugin/cmd/scheduler
|
||||
)
|
||||
fi
|
||||
|
||||
binaries=()
|
||||
local target
|
||||
for target in "${targets[@]}"; do
|
||||
binaries+=("${KUBE_GO_PACKAGE}/${target}")
|
||||
done
|
||||
|
||||
ARCH_TARGET="${KUBE_TARGET}/${GOOS}/${GOARCH}"
|
||||
mkdir -p "${ARCH_TARGET}"
|
||||
|
||||
function make-binary() {
|
||||
echo "+++ Building $1 for ${GOOS}/${GOARCH}"
|
||||
godep go build \
|
||||
-o "${ARCH_TARGET}/$1" \
|
||||
github.com/GoogleCloudPlatform/kubernetes/cmd/$1
|
||||
}
|
||||
|
||||
if [[ -n $1 ]]; then
|
||||
make-binary $1
|
||||
if [[ -n "$1" ]]; then
|
||||
make-binary "$1"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for b in ${BINARIES}; do
|
||||
make-binary $b
|
||||
local b
|
||||
for b in "${binaries[@]}"; do
|
||||
make-binary "$b"
|
||||
done
|
||||
}
|
||||
|
@@ -20,15 +20,15 @@ set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
|
||||
readonly CROSS_BINARIES="
|
||||
kubecfg
|
||||
"
|
||||
readonly CROSS_BINARIES=(
|
||||
"./cmd/kubecfg"
|
||||
)
|
||||
|
||||
for platform in ${KUBE_CROSSPLATFORMS}; do
|
||||
(
|
||||
export GOOS=${platform%/*}
|
||||
export GOARCH=${platform##*/}
|
||||
for binary in ${CROSS_BINARIES}; do
|
||||
for binary in "${CROSS_BINARIES[@]}"; do
|
||||
make-binaries "${binary}"
|
||||
done
|
||||
)
|
||||
|
Reference in New Issue
Block a user