Skip to content

Commit 1a7ecab

Browse files
committed
Add invalid job case in check-for-build
Signed-off-by: Tyler Ohlsen <[email protected]>
1 parent 484f6bc commit 1a7ecab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jenkins/check-for-build.jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ pipeline {
7171
echo "Skipping, ${sha.path} already exists."
7272
} else {
7373
try {
74-
// Currently only opensearch build takes an additional test manifest parameter
74+
// TEST_MANIFEST param isn't applicable for distribution-build-opensearch-dashboards job yet,
75+
// so we don't pass it to that job to prevent confusion from Jenkins UI
7576
if (TARGET_JOB_NAME == 'distribution-build-opensearch') {
7677
build job: "${TARGET_JOB_NAME}", parameters: [
7778
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}"),
@@ -81,6 +82,8 @@ pipeline {
8182
build job: "${TARGET_JOB_NAME}", parameters: [
8283
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}")
8384
], wait: true
85+
} else {
86+
throw new Exception("Job ${TARGET_JOB_NAME} is not a valid option")
8487
}
8588
echo "Build succeeded, uploading build SHA for that job"
8689
buildUploadManifestSHA(
@@ -89,6 +92,7 @@ pipeline {
8992
)
9093
} catch (err) {
9194
echo "${TARGET_JOB_NAME} failed"
95+
echo "Exception: ${err.getMessage()}"
9296
}
9397
}
9498
}

0 commit comments

Comments
 (0)