Modify jenkins unit/integration scripts to work on branches
Also add a makefile. This will need a cherrypick onto 1.0,1.1 with edits to hack/jenkins/test-dockerized.sh to run branch-specific test scripts. Also had to modify hack/verify-api-reference.sh to handle volume mount path peculiarity when doing `docker run -v` inside a container started with `docker run -v`. See associated comment in hack/jenkins/test-dockerized.sh
This commit is contained in:
@@ -26,11 +26,19 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
kube::golang::setup_env
|
||||
|
||||
API_REFERENCE_DOCS_ROOT="${KUBE_ROOT}/docs/api-reference"
|
||||
# Use REPO_DIR if provided so we can set it to the host-resolvable path
|
||||
# to the repo root if we are running this script from a container with
|
||||
# docker mounted in as a volume.
|
||||
# We pass the host output dir to update-api-reference-docs.sh, but use
|
||||
# the regular one to compute diff (they will be the same if running this
|
||||
# test on the host, potentially different if running in a container).
|
||||
REPO_DIR=${REPO_DIR:-"${KUBE_ROOT}"}
|
||||
HOST_OUTPUT_DIR="${REPO_DIR}/_tmp/api-reference"
|
||||
TMP_OUTPUT_DIR="${KUBE_ROOT}/_tmp/api-reference"
|
||||
TMP_ROOT="${KUBE_ROOT}/_tmp"
|
||||
|
||||
# Generate API reference docs in tmp.
|
||||
"./hack/update-api-reference-docs.sh" "${TMP_OUTPUT_DIR}"
|
||||
"./hack/update-api-reference-docs.sh" "${HOST_OUTPUT_DIR}"
|
||||
|
||||
echo "diffing ${API_REFERENCE_DOCS_ROOT} against freshly generated docs"
|
||||
ret=0
|
||||
|
Reference in New Issue
Block a user