Skip to content

Commit

Permalink
Add check for test manifest and update error message (#2321)
Browse files Browse the repository at this point in the history
* Add check for test manifest and update error message

Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya authored Jul 11, 2022
1 parent 5032521 commit 8b4f0b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions jenkins/opensearch-dashboards/bwc-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pipeline {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Missing parameter: AGENT_LABEL.")
}
if (!fileExists("manifests/${TEST_MANIFEST}")) {
if (TEST_MANIFEST == '' || !fileExists("manifests/${TEST_MANIFEST}")) {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Test manifest not found in manifests/${TEST_MANIFEST}.")
error("BWC Tests failed to start. Test manifest was not provided or not found in manifests/${TEST_MANIFEST}.")
}
/*
Rebuilding of this job will result in considering the upstream build as self($JOB_NAME) See https://issues.jenkins.io/browse/JENKINS-61590 for bug
Expand Down
4 changes: 2 additions & 2 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ pipeline {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Missing parameter: AGENT_LABEL.")
}
if (!fileExists("manifests/${TEST_MANIFEST}")) {
if (TEST_MANIFEST == '' || !fileExists("manifests/${TEST_MANIFEST}")) {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Test manifest not found in manifests/${TEST_MANIFEST}.")
error("Integration Tests failed to start. Test manifest was not provided or not found in manifests/${TEST_MANIFEST}.")
}
/*
Rebuilding of this job will result in considering upstream build as self($JOB_NAME) See https://issues.jenkins.io/browse/JENKINS-61590 for bug
Expand Down
4 changes: 2 additions & 2 deletions jenkins/opensearch/bwc-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ pipeline {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Missing parameter: AGENT_LABEL.")
}
if (!fileExists("manifests/${TEST_MANIFEST}")) {
if (TEST_MANIFEST == '' || !fileExists("manifests/${TEST_MANIFEST}")) {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Test manifest not found in manifests/${TEST_MANIFEST}.")
error("BWC Tests failed to start. Test manifest not was provided or not found in manifests/${TEST_MANIFEST}.")
}
/*
Rebuilding of this job will result in considering upstream build as self($JOB_NAME) See https://issues.jenkins.io/browse/JENKINS-61590 for bug
Expand Down
4 changes: 2 additions & 2 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ pipeline {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Missing parameter: AGENT_LABEL.")
}
if (!fileExists("manifests/${TEST_MANIFEST}")) {
if (TEST_MANIFEST == '' || !fileExists("manifests/${TEST_MANIFEST}")) {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Test manifest not found in manifests/${TEST_MANIFEST}.")
error("Integration Tests failed to start. Test manifest was not provided or not found in manifests/${TEST_MANIFEST}.")
}
/*
Rebuilding of this job will result in considering upstream build as self($JOB_NAME) See https://issues.jenkins.io/browse/JENKINS-61590 for bug
Expand Down

0 comments on commit 8b4f0b4

Please sign in to comment.