-
Notifications
You must be signed in to change notification settings - Fork 700
refactor(ci): enforce required env variables in build scripts #35990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not only verified to be set here, but also by This is one of the downsides of |
||
|
|
||
| if ! docker ps &> /dev/null; then | ||
| echo "No working docker command found." | ||
| exit 1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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)}" | ||||||||||
|
||||||||||
| : "${CPP_TEST_TOKEN:?Environment variable CPP_TEST_TOKEN must be set (token for uploading C++ test results)}" | |
| : "${CPP_TEST_TOKEN:?Environment variable CPP_TEST_TOKEN must be set (token for uploading C++ test results)}" | |
| : "${WORKDIR:?Environment variable WORKDIR must be set (working directory for test results)}" | |
| : "${LOG_DIR:?Environment variable LOG_DIR must be set (directory containing C++ test results)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that
$SOURCE_DIRis a directory is a better test? (Such a test would be even better beforenounset)