From 5c2ff5465a8dd5d4a1a557f4d4f5828bb9cd0b0a Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Mon, 7 Oct 2024 15:02:42 -0700 Subject: [PATCH] fix Signed-off-by: Sayali Gaikawad --- vars/updateIntegTestFailureIssues.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vars/updateIntegTestFailureIssues.groovy b/vars/updateIntegTestFailureIssues.groovy index a40fb42a..96e768d2 100644 --- a/vars/updateIntegTestFailureIssues.groovy +++ b/vars/updateIntegTestFailureIssues.groovy @@ -16,6 +16,7 @@ import jenkins.ComponentBuildStatus import jenkins.ComponentIntegTestStatus import jenkins.CreateIntegTestMarkDownTable import groovy.json.JsonOutput +import groovy.json.JsonSlurper void call(Map args = [:]) { def inputManifest = readYaml(file: args.inputManifestPath) @@ -50,10 +51,10 @@ void call(Map args = [:]) { def testData = [] def queryData = componentIntegTestStatus.getComponentIntegTestFailedData(component.name) def queryDataJson = JsonOutput.toJson(queryData) - println(queryDataJson) println("Query Data: ${queryData.getClass().getName()}") - println("Query Data: ${queryDataJson.getClass().getName()}") - def totalHits = queryDataJson.hits.hits.collect {it._source} + def queryDataMap = new JsonSlurper().parseText(queryDataJson) + println("queryDataMap Data: ${queryDataMap.getClass().getName()}") + def totalHits = queryDataMap.hits.hits.collect {it._source} println("totalHits Data: ${totalHits.getClass().getName()}") totalHits.each { hit -> def rowData = [