mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Rename output/
directory to _output/
go build ./... will ignore any directory starting with an underscore.
This commit is contained in:
@@ -16,8 +16,8 @@ To build Kubernetes you need to have access to a Docker installation through eit
|
||||
* `run-tests.sh`: This will run the Kubernetes unit tests in a Docker container
|
||||
* `run-integration.sh`: This will build and run the integration test in a Docker container
|
||||
* `make-cross.sh`: This will make all cross-compiled binaries (currently just kubecfg).
|
||||
* `copy-output.sh`: This will copy the contents of `output/build` from any remote Docker container to the local `output/build`. Right now this is only necessary on Mac OS X with `boot2docker`.
|
||||
* `make-clean.sh`: Clean out the contents of `output/build`.
|
||||
* `copy-output.sh`: This will copy the contents of `_output/build` from any remote Docker container to the local `_output/build`. Right now this is only necessary on Mac OS X with `boot2docker`.
|
||||
* `make-clean.sh`: Clean out the contents of `_output/build`.
|
||||
* `shell.sh`: Drop into a `bash` shell in a build container with a snapshot of the current repo code.
|
||||
* `release.sh`: Build everything, test it, upload the results to a GCS bucket. Docker images are also sent to the same bucket using the [`google/docker-registry`](https://registry.hub.docker.com/u/google/docker-registry/) Docker image.
|
||||
|
||||
@@ -44,11 +44,11 @@ Other build artifacts:
|
||||
|
||||
The scripts directly under `build/` are used to build and test. They will ensure that the `kube-build` Docker image is built (based on `build/build-image/Dockerfile`) and then execute the appropriate command in that container. If necessary (for Mac OS X), the scripts will also copy results out.
|
||||
|
||||
The `kube-build` container image is built by first creating a "context" directory in `output/images/build-image`. It is done there instead of at the root of the Kubernetes repo to minimize the amount of data we need to package up when building the image.
|
||||
The `kube-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the Kubernetes repo to minimize the amount of data we need to package up when building the image.
|
||||
|
||||
Everything in `build/build-image/` is meant to be run inside of the container. If it doesn't think it is running in the container it'll throw a warning. While you can run some of that stuff outside of the container, it wasn't built to do so.
|
||||
|
||||
The files necessarily for the release Docker images are in `build/run-images/*`. All of this is staged into `output/images` similar to build-image. The `base` image is used as a base for each of the specialized containers and is generally never pushed to a shared repository.
|
||||
The files necessarily for the release Docker images are in `build/run-images/*`. All of this is staged into `_output/images` similar to build-image. The `base` image is used as a base for each of the specialized containers and is generally never pushed to a shared repository.
|
||||
|
||||
## TODOs
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
cd $(dirname "${BASH_SOURCE}")/../.. >/dev/null
|
||||
readonly KUBE_REPO_ROOT="${PWD}"
|
||||
readonly KUBE_TARGET="${KUBE_REPO_ROOT}/output/build"
|
||||
readonly KUBE_TARGET="${KUBE_REPO_ROOT}/_output/build"
|
||||
readonly KUBE_GO_PACKAGE=github.com/GoogleCloudPlatform/kubernetes
|
||||
|
||||
mkdir -p "${KUBE_TARGET}"
|
||||
|
@@ -18,12 +18,12 @@ set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
|
||||
ETCD_DIR="${KUBE_REPO_ROOT}/output/etcd"
|
||||
ETCD_DIR="${KUBE_REPO_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_REPO_ROOT}/_output/etcd.log" &
|
||||
ETCD_PID=$!
|
||||
|
||||
sleep 5
|
||||
|
@@ -27,13 +27,13 @@ fi
|
||||
readonly KUBE_BUILD_IMAGE
|
||||
readonly KUBE_GO_PACKAGE="github.com/GoogleCloudPlatform/kubernetes"
|
||||
|
||||
# We set up a volume so that we have the same output directory from one run of
|
||||
# We set up a volume so that we have the same _output directory from one run of
|
||||
# the container to the next.
|
||||
#
|
||||
# Note that here "LOCAL" is local to the docker daemon. In the boot2docker case
|
||||
# this is still inside the VM. We use the same directory in both cases though.
|
||||
readonly LOCAL_OUTPUT_DIR="${KUBE_REPO_ROOT}/output/build"
|
||||
readonly REMOTE_OUTPUT_DIR="/go/src/${KUBE_GO_PACKAGE}/output/build"
|
||||
readonly LOCAL_OUTPUT_DIR="${KUBE_REPO_ROOT}/_output/build"
|
||||
readonly REMOTE_OUTPUT_DIR="/go/src/${KUBE_GO_PACKAGE}/_output/build"
|
||||
readonly DOCKER_CONTAINER_NAME=kube-build
|
||||
readonly DOCKER_MOUNT="-v ${LOCAL_OUTPUT_DIR}:${REMOTE_OUTPUT_DIR}"
|
||||
|
||||
@@ -45,7 +45,7 @@ readonly KUBE_RUN_BINARIES="
|
||||
"
|
||||
|
||||
# This is where the final release artifacts are created locally
|
||||
readonly RELEASE_DIR="${KUBE_REPO_ROOT}/output/release"
|
||||
readonly RELEASE_DIR="${KUBE_REPO_ROOT}/_output/release"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Basic setup functions
|
||||
@@ -116,7 +116,7 @@ function verify-gcs-prereqs() {
|
||||
|
||||
# Set up the context directory for the kube-build image and build it.
|
||||
function build-image() {
|
||||
local -r BUILD_CONTEXT_DIR="${KUBE_REPO_ROOT}/output/images/${KUBE_BUILD_IMAGE}"
|
||||
local -r BUILD_CONTEXT_DIR="${KUBE_REPO_ROOT}/_output/images/${KUBE_BUILD_IMAGE}"
|
||||
local -r SOURCE="
|
||||
api
|
||||
build
|
||||
@@ -137,14 +137,14 @@ function build-image() {
|
||||
}
|
||||
|
||||
# Builds the runtime image. Assumes that the appropriate binaries are already
|
||||
# built and in output/build/.
|
||||
# built and in _output/build/.
|
||||
function run-image() {
|
||||
local -r BUILD_CONTEXT_BASE="${KUBE_REPO_ROOT}/output/images/${KUBE_RUN_IMAGE_BASE}"
|
||||
local -r BUILD_CONTEXT_BASE="${KUBE_REPO_ROOT}/_output/images/${KUBE_RUN_IMAGE_BASE}"
|
||||
|
||||
# First build the base image. This one brings in all of the binaries.
|
||||
mkdir -p "${BUILD_CONTEXT_BASE}"
|
||||
tar czf ${BUILD_CONTEXT_BASE}/kube-bins.tar.gz \
|
||||
-C "output/build/linux/amd64" \
|
||||
-C "_output/build/linux/amd64" \
|
||||
${KUBE_RUN_BINARIES}
|
||||
cp -R build/run-images/base/* "${BUILD_CONTEXT_BASE}/"
|
||||
docker-build "${KUBE_RUN_IMAGE_BASE}" "${BUILD_CONTEXT_BASE}"
|
||||
@@ -212,7 +212,7 @@ function copy-output() {
|
||||
# Kill any leftover container
|
||||
docker rm ${DOCKER_CONTAINER_NAME} >/dev/null 2>&1 || true
|
||||
|
||||
echo "+++ Syncing back output directory from boot2docker VM"
|
||||
echo "+++ Syncing back _output directory from boot2docker VM"
|
||||
mkdir -p "${LOCAL_OUTPUT_DIR}"
|
||||
rm -rf "${LOCAL_OUTPUT_DIR}/*"
|
||||
${DOCKER} sh -c "tar c -C ${REMOTE_OUTPUT_DIR} ." \
|
||||
@@ -300,12 +300,12 @@ function package-tarballs() {
|
||||
mkdir -p "${RELEASE_DIR}"
|
||||
|
||||
# Find all of the built kubecfg binaries
|
||||
for platform in output/build/*/* ; do
|
||||
for platform in _output/build/*/* ; do
|
||||
echo $platform
|
||||
local PLATFORM_TAG=$(echo $platform | awk -F / '{ printf "%s-%s", $3, $4 }')
|
||||
echo "+++ Building client package for $PLATFORM_TAG"
|
||||
|
||||
local CLIENT_RELEASE_STAGE="${KUBE_REPO_ROOT}/output/release-stage/${PLATFORM_TAG}/kubernetes"
|
||||
local CLIENT_RELEASE_STAGE="${KUBE_REPO_ROOT}/_output/release-stage/${PLATFORM_TAG}/kubernetes"
|
||||
mkdir -p "${CLIENT_RELEASE_STAGE}"
|
||||
mkdir -p "${CLIENT_RELEASE_STAGE}/bin"
|
||||
|
||||
|
@@ -22,4 +22,4 @@ source $(dirname $0)/common.sh
|
||||
|
||||
verify-prereqs
|
||||
build-image
|
||||
run-build-command rm -rf output/build/*
|
||||
run-build-command rm -rf _output/build/*
|
||||
|
Reference in New Issue
Block a user