Skip to content

Commit

Permalink
Remove old args check on publishIntegTestResults
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon committed Aug 21, 2024
1 parent 571310e commit 7fb7a95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jacocoTestReport {
}
}

String version = '6.8.3'
String version = '6.8.4'

task updateVersion {
doLast {
Expand Down
7 changes: 3 additions & 4 deletions vars/publishIntegTestResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ void call(Map args = [:]) {
def isNullOrEmpty = { str ->
str == null || (str instanceof String && str.trim().isEmpty())
}
if (isNullOrEmpty(args.version) || isNullOrEmpty(args.distributionBuildNumber) || isNullOrEmpty(args.distributionBuildUrl) ||
isNullOrEmpty(args.rcNumber) || isNullOrEmpty(args.rc) || isNullOrEmpty(args.platform) ||
isNullOrEmpty(args.architecture) || isNullOrEmpty(args.distribution) || isNullOrEmpty(args.testReportManifestYml) || isNullOrEmpty(args.jobName)) {
// Check if any args is equals to null or it is a test run
if (isNullOrEmpty(args.distributionBuildUrl) || isNullOrEmpty(args.testReportManifestYml) || isNullOrEmpty(args.jobName) || args.jobName.equals('dummy_job')) {
return null
}

Expand All @@ -40,7 +39,6 @@ void call(Map args = [:]) {
def formattedDate = new SimpleDateFormat("MM-yyyy").format(currentDate)
def testReportManifestYml = args.testReportManifestYml
def jobName = args.jobName
def testReportManifestYmlUrl = "https://ci.opensearch.org/ci/dbc/${jobName}/${version}/${distributionBuildNumber}/${platform}/${architecture}/${distribution}/test-results/${integTestBuildNumber}/integ-test/test-report.yml"
def manifestFile = readFile testReportManifestYml
def manifest = readYaml text: manifestFile
def indexName = "opensearch-integration-test-results-${formattedDate}"
Expand All @@ -52,6 +50,7 @@ void call(Map args = [:]) {
def platform = manifest.platform
def architecture = manifest.architecture
def distribution = manifest.distribution
def testReportManifestYmlUrl = "https://ci.opensearch.org/ci/dbc/${jobName}/${version}/${distributionBuildNumber}/${platform}/${architecture}/${distribution}/test-results/${integTestBuildNumber}/integ-test/test-report.yml"

manifest.components.each { component ->
def componentName = component.name
Expand Down

0 comments on commit 7fb7a95

Please sign in to comment.