diff --git a/.buildkite/bootstrap-cmake.sh b/.buildkite/bootstrap-cmake.sh index 5c63cf97fb9b..f1169ab1703e 100755 --- a/.buildkite/bootstrap-cmake.sh +++ b/.buildkite/bootstrap-cmake.sh @@ -12,6 +12,8 @@ if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" + echo "--- ๐Ÿ”ง Configuring CMake build" # shellcheck disable=1091 source /etc/profile.d/enable-gcc-toolset.sh diff --git a/.buildkite/bootstrap.sh b/.buildkite/bootstrap.sh index b4b6115912d4..d7a4c8a14a35 100755 --- a/.buildkite/bootstrap.sh +++ b/.buildkite/bootstrap.sh @@ -12,6 +12,9 @@ if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" +: "${VESPA_CPP_TEST_JARS:?Environment variable VESPA_CPP_TEST_JARS must be set (path for C++ test JARs)}" + echo "--- ๐Ÿ”ง Running Vespa bootstrap" cd "$SOURCE_DIR" ./bootstrap.sh full diff --git a/.buildkite/build-container.sh b/.buildkite/build-container.sh index 26d342d7db3d..d58b8506c5ae 100755 --- a/.buildkite/build-container.sh +++ b/.buildkite/build-container.sh @@ -11,6 +11,8 @@ if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi +: "${VESPA_BUILDOS_LABEL:?Environment variable VESPA_BUILDOS_LABEL must be set (build OS label)}" + if ! docker ps &> /dev/null; then echo "No working docker command found." exit 1 diff --git a/.buildkite/cpp-test.sh b/.buildkite/cpp-test.sh index 871ec6139313..6d10277daf4f 100755 --- a/.buildkite/cpp-test.sh +++ b/.buildkite/cpp-test.sh @@ -11,7 +11,8 @@ set -o pipefail if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi - +: "${NUM_CPU_LIMIT:?Environment variable NUM_CPU_LIMIT must be set (CPU limit)}" +: "${LOG_DIR:?Environment variable LOG_DIR must be set (log directory)}" echo "--- ๐Ÿงช Running C++ tests" PATH=/opt/vespa-deps/bin:$PATH diff --git a/.buildkite/cpp.sh b/.buildkite/cpp.sh index 220d61b73bc8..1dac8f0c5535 100755 --- a/.buildkite/cpp.sh +++ b/.buildkite/cpp.sh @@ -14,6 +14,9 @@ fi mydir=${0%/*} shlim=${mydir}/show-limits.sh + +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" +: "${NUM_CPP_THREADS:?Environment variable NUM_CPP_THREADS must be set (number of C++ threads)}" if [ -x "${shlim}" ]; then "${shlim}" || echo "failed: ${shlim}" fi diff --git a/.buildkite/go.sh b/.buildkite/go.sh index 856090263ab4..9b5f8e24a2bd 100755 --- a/.buildkite/go.sh +++ b/.buildkite/go.sh @@ -11,7 +11,8 @@ set -o pipefail if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi - +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" +: "${WORKDIR:?Environment variable WORKDIR must be set (working directory)}" echo "--- ๐Ÿน Building Go components" cd "$SOURCE_DIR" diff --git a/.buildkite/install.sh b/.buildkite/install.sh index 38f588605720..c9724c805334 100755 --- a/.buildkite/install.sh +++ b/.buildkite/install.sh @@ -11,7 +11,8 @@ set -o pipefail if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi - +: "${NUM_CPU_LIMIT:?Environment variable NUM_CPU_LIMIT must be set (CPU limit)}" +: "${WORKDIR:?Environment variable WORKDIR must be set (working directory)}" echo "--- ๐Ÿ“ฆ Installing Vespa components" echo "Running make install with $NUM_CPU_LIMIT parallel jobs..." make -j "$NUM_CPU_LIMIT" install DESTDIR="$WORKDIR/vespa-install" diff --git a/.buildkite/java.sh b/.buildkite/java.sh index 1821a79c92bb..660a11ec3a76 100755 --- a/.buildkite/java.sh +++ b/.buildkite/java.sh @@ -14,6 +14,10 @@ fi mydir=${0%/*} shlim=${mydir}/show-limits.sh + +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" +: "${VESPA_MAVEN_TARGET:?Environment variable VESPA_MAVEN_TARGET must be set (Maven target)}" +: "${NUM_MVN_THREADS:?Environment variable NUM_MVN_THREADS must be set (Maven threads)}" if [ -x "${shlim}" ]; then "${shlim}" || echo "failed: ${shlim}" fi diff --git a/.buildkite/quick-start-guide.sh b/.buildkite/quick-start-guide.sh index 6fa0abb3e365..9821b3da8659 100755 --- a/.buildkite/quick-start-guide.sh +++ b/.buildkite/quick-start-guide.sh @@ -12,6 +12,8 @@ if [[ -n "${DEBUG:-}" ]]; then set -o xtrace fi +: "${SOURCE_DIR:?Environment variable SOURCE_DIR must be set (path to source code)}" + if [[ $VESPA_USE_SANITIZER != null ]]; then echo "Skipping quick start guide test for sanitizer builds." exit 0 diff --git a/.buildkite/upload-test-results.sh b/.buildkite/upload-test-results.sh index 08d947c5a72a..0162f80f01ed 100755 --- a/.buildkite/upload-test-results.sh +++ b/.buildkite/upload-test-results.sh @@ -26,14 +26,8 @@ else CPP_TEST_TOKEN=$UNIT_TEST_CPP_ARM64_TOKEN fi -if [[ -z $JAVA_TEST_TOKEN ]]; then - echo "Missing JAVA_TEST_TOKEN. Exiting." - exit 1 -fi -if [[ -z $CPP_TEST_TOKEN ]]; then - echo "Missing CPP_TEST_TOKEN. Exiting." - exit 1 -fi +: "${JAVA_TEST_TOKEN:?Environment variable JAVA_TEST_TOKEN must be set (token for uploading Java test results)}" +: "${CPP_TEST_TOKEN:?Environment variable CPP_TEST_TOKEN must be set (token for uploading C++ test results)}" upload_result() { curl \