From 88406cbd5150629551277f6aa3ba06613b28a35d Mon Sep 17 00:00:00 2001 From: AnjaliAbraham Date: Wed, 9 Apr 2025 17:08:24 +0530 Subject: [PATCH 1/2] TAZ EDT results conversion for Jenkins template --- Templates/JenkinsPipeline/Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Templates/JenkinsPipeline/Jenkinsfile b/Templates/JenkinsPipeline/Jenkinsfile index b2fa544f..718b2c47 100644 --- a/Templates/JenkinsPipeline/Jenkinsfile +++ b/Templates/JenkinsPipeline/Jenkinsfile @@ -131,6 +131,9 @@ def BuildOutputDir = "" // DBB Build Output Directory (Discov def BuildFile = "" // Will contain the contents of the DBB buildFile.txt. def BuildHasFiles = true // DBB buildFile.txt indicates changed files. +def TazLogs = "*.tazunittest.report.log" // Will contain the contents of the TAZ unit test runner result file * (*.bzures) +def TazReports = "" // Will contain the contents of the TAZ unit test runner result file converted to JUnit test run file (*.xml) +def XLSConv = "/var/dbb/extensions/zunit2junit/AZUZ2J40.xsl" // XSL stylesheet that converts a unit test runner result file to a JUnit test run file def PackageCmd = "" // Packaging Command. def Packagerc = 0 // Packaging Command Return Code. @@ -411,6 +414,16 @@ pipeline { dir ("${BuildOutputDir}") { BuildFile = findFiles(glob: "buildList.txt") + TazReports = findFiles(glob: TazLogs) + + TazReports.each { item -> + //echo item.name + sh "Xalan -o ${BuildOutputDir}/${item.name}.xml ${BuildOutputDir}/${item.name} ${XLSConv}" + } + + if(TazReports.length > 0){ + junit '*.log.xml' + } } if (pipeverbose) { From 0fa9ab19edb3395de534ccfcd9dbb2db7e622201 Mon Sep 17 00:00:00 2001 From: AnjaliAbraham <47593670+AnjaliAbraham@users.noreply.github.com> Date: Mon, 21 Apr 2025 10:05:10 +0530 Subject: [PATCH 2/2] Update Jenkinsfile --- Templates/JenkinsPipeline/Jenkinsfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Templates/JenkinsPipeline/Jenkinsfile b/Templates/JenkinsPipeline/Jenkinsfile index 718b2c47..17f143eb 100644 --- a/Templates/JenkinsPipeline/Jenkinsfile +++ b/Templates/JenkinsPipeline/Jenkinsfile @@ -131,9 +131,21 @@ def BuildOutputDir = "" // DBB Build Output Directory (Discov def BuildFile = "" // Will contain the contents of the DBB buildFile.txt. def BuildHasFiles = true // DBB buildFile.txt indicates changed files. +// TAZ Unit Test results to JUnit +// +// The sample style sheets are provided in the installation_path/taz_samples/xsl directory of the Early Development Testing for z/OS client. +// These need to to uploaded to USS and should be made accessible to the pipeline user +// To convert the TAZ results the command xalan needs to be avaiable in the PATH of the pipeline user +// Below is an example of the .profile configuration +// #xml +// export XALANCROOT=/usr/lpp/ixm/IBM/xslt4c-1_12 +// export XERCESCROOT=/usr/lpp/ixm/IBM/xml4c-5_8 +// export PATH=$PATH:$XALANCROOT/bin +// The Jenkins node too needs to be configured to include xalan as an environment variable, for example - XALANCROOT=/usr/lpp/ixm/IBM/xslt4c-1_12 def TazLogs = "*.tazunittest.report.log" // Will contain the contents of the TAZ unit test runner result file * (*.bzures) def TazReports = "" // Will contain the contents of the TAZ unit test runner result file converted to JUnit test run file (*.xml) def XLSConv = "/var/dbb/extensions/zunit2junit/AZUZ2J40.xsl" // XSL stylesheet that converts a unit test runner result file to a JUnit test run file + def PackageCmd = "" // Packaging Command. def Packagerc = 0 // Packaging Command Return Code. @@ -417,7 +429,7 @@ pipeline { TazReports = findFiles(glob: TazLogs) TazReports.each { item -> - //echo item.name + // Convert TAZ EDT results to JUnit format sh "Xalan -o ${BuildOutputDir}/${item.name}.xml ${BuildOutputDir}/${item.name} ${XLSConv}" }