mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
Rework hack/ and build/ directories.
* Rewrite a bunch of the hack/ directory with modular reusable bash libraries. * Have 'build/*' build on 'hack/*'. The stuff in build now just runs hack/* in a docker container. * Use a docker data container to enable faster incremental builds. * Standardize output to _output/{local,dockerized}/bin/OS/ARCH/*. This regularized placement makes cross compilation work. * Move travis specific scripts under hack/travis With new dockerized incremental builds, I can do a no-op `make quick-release` in ~30s. This is a significant improvement.
This commit is contained in:
@@ -19,34 +19,28 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
source "${KUBE_ROOT}/hack/config-go.sh"
|
||||
source "${KUBE_ROOT}/hack/util.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
cleanup() {
|
||||
kill "${ETCD_PID-}" >/dev/null 2>&1 || :
|
||||
rm -rf "${ETCD_DIR-}"
|
||||
echo ""
|
||||
echo "Complete"
|
||||
kube::etcd::cleanup
|
||||
kube::log::status "Integration test cleanup complete"
|
||||
}
|
||||
|
||||
if [[ "${KUBE_NO_BUILD_INTEGRATION+set}" != "set" ]]; then
|
||||
if [[ -z ${KUBE_NO_BUILD_INTEGRATION-} ]]; then
|
||||
"${KUBE_ROOT}/hack/build-go.sh" cmd/integration
|
||||
fi
|
||||
|
||||
# Run cleanup to stop etcd on interrupt or other kill signal.
|
||||
trap cleanup HUP INT QUIT TERM
|
||||
|
||||
start_etcd
|
||||
kube::etcd::start
|
||||
|
||||
echo ""
|
||||
echo "Integration test cases..."
|
||||
echo ""
|
||||
GOFLAGS="-tags 'integration no-docker' -test.v" \
|
||||
kube::log::status "Running integration test cases"
|
||||
KUBE_GOFLAGS="-tags 'integration no-docker' -test.v" \
|
||||
"${KUBE_ROOT}/hack/test-go.sh" test/integration
|
||||
|
||||
echo ""
|
||||
echo "Integration scenario ..."
|
||||
echo ""
|
||||
"${KUBE_TARGET}/bin/integration"
|
||||
kube::log::status "Running integration test scenario"
|
||||
|
||||
"${KUBE_OUTPUT_HOSTBIN}/integration"
|
||||
|
||||
cleanup
|
||||
|
Reference in New Issue
Block a user