From 6d40df78b23812bdbd0fcf354079991772545bae Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 7 Jul 2023 10:54:33 +0200 Subject: [PATCH 01/11] Added support for zCEE OpenAPI 3 Signed-off-by: Mathieu --- build-conf/zCEE3.properties | 25 ++++++ languages/README.md | 1 + languages/zCEE3.groovy | 98 +++++++++++++++++++++++ samples/application-conf/zCEE3.properties | 25 ++++++ 4 files changed, 149 insertions(+) create mode 100644 build-conf/zCEE3.properties create mode 100644 languages/zCEE3.groovy create mode 100644 samples/application-conf/zCEE3.properties diff --git a/build-conf/zCEE3.properties b/build-conf/zCEE3.properties new file mode 100644 index 00000000..6eb36801 --- /dev/null +++ b/build-conf/zCEE3.properties @@ -0,0 +1,25 @@ +# Releng properties used by language/zCEE3.groovy + +# +# Comma separated list of required build properties for zCEE3.groovy +zCEE_requiredBuildProperties=zCEE_alwaysRebuildWAR, zCEE_shellEnvironment,\ + zCEE_gradlePath, zCEE_gradle_JAVA_OPTS + + +# +# When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. +# When set to false, will pick the existing WAR file if found or will build it if no WAR file is found +zCEE_alwaysRebuildWAR=true + +# +# Shell environment used to run the gradle command +zCEE_shellEnvironment=bash + +# +# Path to gradle executable +zCEE_gradlePath=/var/gradle/gradle-7.6/bin/gradle + +# +# JAVA Options used with gradle +# for instance: zCEE_gradle_JAVA_OPTS=-Xmx512m -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 +zCEE_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 \ No newline at end of file diff --git a/languages/README.md b/languages/README.md index 13318cd7..d388577a 100644 --- a/languages/README.md +++ b/languages/README.md @@ -10,6 +10,7 @@ zAppBuild comes with a number of language specific build scripts. These script * DBDgen.groovy * PSBgen.groovy * MFS.groovy +* zCEE3.groovy * ZunitConfig.groovy All language scripts both compile and optionally link-edit programs. The language build scripts are intended to be useful out of the box but depending on the complexity of your applications' build requirements, may require modifications to meet your development team's needs. By following the examples used in the existing language build scripts of keeping all application specific references out of the build scripts and instead using configuration properties with strong default values, the zAppBuild sample can continue to be a generic build solution for all of your specific applications. diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy new file mode 100644 index 00000000..60a4c67d --- /dev/null +++ b/languages/zCEE3.groovy @@ -0,0 +1,98 @@ +@groovy.transform.BaseScript com.ibm.dbb.groovy.ScriptLoader baseScript +import com.ibm.dbb.dependency.* +import com.ibm.dbb.build.* +import groovy.transform.* +import com.ibm.dbb.build.report.* +import com.ibm.dbb.build.report.records.* +import java.nio.file.*; + + +// define script properties +@Field BuildProperties props = BuildProperties.getInstance() +@Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy")) + +println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script") + +// verify required build properties +buildUtils.assertBuildProperties(props.zCEE_requiredBuildProperties) + +// sort the build list based on build file rank if provided +List sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'zCEE_fileBuildRank') +int currentBuildFileNumber = 1 + +// iterate through build list +sortedList.each { buildFile -> + println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile" + + boolean alwaysRebuildWAR = props.getFileProperty('zCEE_alwaysRebuildWAR', buildFile).toBoolean() + + String workingDir = buildFile.replace("/src/main/api/openapi.yaml", "") + String gradleBuildLocation = "build" + if (props.verbose) + println("** Path to build.gradle: ${workingDir}/${gradleBuildLocation}") + String WarLocation = "${workingDir}/build/libs/api.war" + if (props.verbose) + println("** Expected path to api.war: ${WarLocation}") + File WarFile = new File(WarLocation) + String[] command; + String commandString; + + if (alwaysRebuildWAR || !WarFile.exists()) { + println("** File api.war doesn't exist for this z/OS Connect project. Building it...") + String JAVA_OPTS = props.getFileProperty('zCEE_gradle_JAVA_OPTS', buildFile) + String gradlePath = props.getFileProperty('zCEE_gradlePath', buildFile) + String shellEnvironment = props.getFileProperty('zCEE_shellEnvironment', buildFile) + + command = [shellEnvironment, gradlePath, gradleBuildLocation] + commandString = command.join(" ") + if (props.verbose) + println("** Command to execute: ${commandString} - in working directory: ${workingDir}") + StringBuffer shellOutput = new StringBuffer() + StringBuffer shellError = new StringBuffer() + + ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); + Map env = cmd.environment(); + env.put("JAVA_OPTS", JAVA_OPTS); + cmd.directory(new File(workingDir)); + Process process = cmd.start() + process.consumeProcessOutput(shellOutput, shellError) + process.waitFor() + if (props.verbose) + println("** Exit value for the gradle build: ${process.exitValue()}"); + + if (process.exitValue() != 0) { + def errorMsg = "Error during the gradle process" + println("*! ${errorMsg}") + if (props.verbose) + println("*! gradle error message:\n${shellError}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + System.exit(process.exitValue()) + } else { + if (props.verbose) + println("** gradle output:\n${shellOutput}") + } + } + if (WarFile.exists()) { + // Copy api.war to the outDir directory + File WarFileTarget = new File(props.outDir + '/' + WarLocation); + File WarTargetDir = WarFileTarget.getParentFile(); + WarTargetDir.mkdirs(); + Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); + + AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") + zCEEWARRecord.setAttribute("file", buildFile) + zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") + zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") + zCEEWARRecord.setAttribute("command", commandString); + BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) + } else { + def errorMsg = "Error when locating the api.war file" + println("*! ${errorMsg}") + if (props.verbose) + println("*! zCEE OpenAPI 3 error:\n${shellError}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + System.exit(process.exitValue()) + } +} \ No newline at end of file diff --git a/samples/application-conf/zCEE3.properties b/samples/application-conf/zCEE3.properties new file mode 100644 index 00000000..f4b49d12 --- /dev/null +++ b/samples/application-conf/zCEE3.properties @@ -0,0 +1,25 @@ +# Releng properties used by language/zCEE3.groovy + +# +# Comma separated list of required build properties for zCEE3.groovy +zCEE_requiredBuildProperties=zCEE_alwaysRebuildWAR, zCEE_shellEnvironment,\ + zCEE_gradlePath, zCEE_gradle_JAVA_OPTS + + +# +# When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. +# When set to false, will pick the existing WAR file if found or will build it if no WAR file is found +# zCEE_alwaysRebuildWAR=true + +# +# Shell environment used to run the gradle command +# zCEE_shellEnvironment=bash + +# +# Path to gradle executable +# zCEE_gradlePath=/var/gradle/gradle-7.6/bin/gradle + +# +# JAVA Options used with gradle +# for instance: zCEE_gradle_JAVA_OPTS=-Xmx512m -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 +# zCEE_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 \ No newline at end of file From 930572df90d42a4bedacaecfbbf7afa735f7fef9 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 7 Jul 2023 11:01:34 +0200 Subject: [PATCH 02/11] Fixed unnecessary error message Signed-off-by: Mathieu --- languages/zCEE3.groovy | 2 -- 1 file changed, 2 deletions(-) diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index 60a4c67d..8ee408a5 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -89,8 +89,6 @@ sortedList.each { buildFile -> } else { def errorMsg = "Error when locating the api.war file" println("*! ${errorMsg}") - if (props.verbose) - println("*! zCEE OpenAPI 3 error:\n${shellError}") props.error = "true" buildUtils.updateBuildResult(errorMsg:errorMsg) System.exit(process.exitValue()) From aca89e777321fc77ffecca8c3936b82e2b3e87af Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 7 Jul 2023 11:09:51 +0200 Subject: [PATCH 03/11] Added the script mapping for zCEE3 --- samples/application-conf/file.properties | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/samples/application-conf/file.properties b/samples/application-conf/file.properties index 9f8f39cc..e842f0cc 100644 --- a/samples/application-conf/file.properties +++ b/samples/application-conf/file.properties @@ -12,11 +12,12 @@ dbb.scriptMapping = LinkEdit.groovy :: **/*.lnk dbb.scriptMapping = PLI.groovy :: **/*.pli dbb.scriptMapping = ZunitConfig.groovy :: **/*.bzucfg dbb.scriptMapping = Transfer.groovy :: **/*.jcl, **/*.xml +dbb.scriptMapping = zCEE3.groovy :: **/openapi.yaml # # dbb.scannerMapping to map files extensions to DBB dependency scanner configurations # -# to override/expand the definitions from build-conf/defaultzAppBuildConf.properties +# to override/expand the definitions from build-conf/defaultzAppBuildConf.properties # # this maps file extensions to scanner configuration for the DBB dependency scanners # also see: @@ -25,9 +26,9 @@ dbb.scriptMapping = Transfer.groovy :: **/*.jcl, **/*.xml # Schema # "scannerClass":"ScannerImplementation" : "languageHint":"DBBScannerHint" :: comma separated list of file extensions # -# Note - if an extension of a build file is not specified in the mapping, +# Note - if an extension of a build file is not specified in the mapping, # zAppBuild will skip scanning the file and only record a LogicalFile without capturing dependencies. -# +# # dbb.scannerMapping = "scannerClass":"DependencyScanner", "languageHint":"COB" :: cbl,cpy,cob # dbb.scannerMapping = "scannerClass":"DependencyScanner", "languageHint":"C" :: c, h # dbb.scannerMapping = "scannerClass":"DependencyScanner", "languageHint":"ASM" :: asm, mac @@ -36,12 +37,12 @@ dbb.scriptMapping = Transfer.groovy :: **/*.jcl, **/*.xml # dbb.scannerMapping = "scannerClass":"ZUnitConfigScanner" :: bzucfg # -# General file level overwrites through DBB Build Properties +# General file level overwrites through DBB Build Properties # isCICS = true :: **/cobol/member.cbl # isSQL = true :: **/cobol/member.cbl # isMQ = true :: **/cobol/member.cbl -# +# # Please check for available file property overwrites within samples/application-conf/README.md # @@ -56,15 +57,15 @@ dbb.scriptMapping = Transfer.groovy :: **/*.jcl, **/*.xml ######### # Configuration for Transfer.groovy which copies files to target datasets and report them -# in the BuildReport +# in the BuildReport ######### # -# PropertyMapping to map files using the Transfer.groovy language script to different target datasets +# PropertyMapping to map files using the Transfer.groovy language script to different target datasets # # transfer_datasetMapping = transfer_jclPDS :: **/*.jcl # transfer_datasetMapping = transfer_xmlPDS :: **/xml/*.* # -# file mapping for overwriting the default deployType of the Transfer.groovy language script +# file mapping for overwriting the default deployType of the Transfer.groovy language script # # transfer_deployType = JCL :: **/*.jcl -# transfer_deployType = XML :: **/xml/*.* \ No newline at end of file +# transfer_deployType = XML :: **/xml/*.* From e6a388fb95b1442434ad9f6f231ad740b33c7eaf Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 7 Jul 2023 15:26:11 +0200 Subject: [PATCH 04/11] Added description for properties Signed-off-by: Mathieu --- build-conf/README.md | 11 +++++++++++ samples/application-conf/README.md | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/build-conf/README.md b/build-conf/README.md index 113532b5..9413037e 100644 --- a/build-conf/README.md +++ b/build-conf/README.md @@ -292,6 +292,17 @@ zunit_reportDatasets | Comma separated list of 'report' type data sets zunit_reportOptions | BPXWDYN creation options for creating 'report' type data sets zunit_dependenciesDatasetMapping | DBB property mapping to map dependencies to different target datasets +### zCEE3.Properties +Application properties used by zAppBuild/language/zCEE3.groovy + +Property | Description +--- | --- | --- +zCEE_alwaysRebuildWAR | Options to rebuild WAR file +zCEE_shellEnvironment | Shell environment used to run the gradle command +zCEE_gradlePath | Path to gradle executable +zCEE_gradle_JAVA_OPTS | JAVA Options used with gradle + + ### Transfer.properties Build properties used by zAppBuild/language/Transfer.groovy diff --git a/samples/application-conf/README.md b/samples/application-conf/README.md index 02f049f9..79e5d73c 100644 --- a/samples/application-conf/README.md +++ b/samples/application-conf/README.md @@ -267,6 +267,16 @@ zunit_CodeCoverageHost | Headless Code Coverage Collector host (if not specified zunit_CodeCoveragePort | Headless Code Coverage Collector port (if not specified IDz will be used for reporting) | true zunit_CodeCoverageOptions | Headless Code Coverage Collector Options | true +### zCEE3.Properties +Application properties used by zAppBuild/language/zCEE3.groovy + +Property | Description | Overridable +--- | --- | --- +zCEE_alwaysRebuildWAR | Options to rebuild WAR file | true +zCEE_shellEnvironment | Shell environment used to run the gradle command | true +zCEE_gradlePath | Path to gradle executable | true +zCEE_gradle_JAVA_OPTS | JAVA Options used with gradle | true + ### REXX.properties Application properties used by zAppBuild/language/REXX.groovy From 40bfd1f1870215db4965a9f219c1a8846d3ca50b Mon Sep 17 00:00:00 2001 From: Mathieu Date: Thu, 17 Aug 2023 17:08:54 +0200 Subject: [PATCH 05/11] Integrate reviewer's comment Sign-off-by: Mathieu --- build-conf/zCEE3.properties | 16 +- languages/zCEE3.groovy | 170 ++++++++++++---------- samples/application-conf/zCEE3.properties | 16 +- 3 files changed, 114 insertions(+), 88 deletions(-) diff --git a/build-conf/zCEE3.properties b/build-conf/zCEE3.properties index 6eb36801..dad5398a 100644 --- a/build-conf/zCEE3.properties +++ b/build-conf/zCEE3.properties @@ -2,24 +2,26 @@ # # Comma separated list of required build properties for zCEE3.groovy -zCEE_requiredBuildProperties=zCEE_alwaysRebuildWAR, zCEE_shellEnvironment,\ - zCEE_gradlePath, zCEE_gradle_JAVA_OPTS +zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gradle_JAVA_OPTS # # When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. # When set to false, will pick the existing WAR file if found or will build it if no WAR file is found -zCEE_alwaysRebuildWAR=true +# When not specified, the default value is set to true +zcee3_alwaysRebuildWAR= # # Shell environment used to run the gradle command -zCEE_shellEnvironment=bash +zcee3_shellEnvironment=bash # -# Path to gradle executable -zCEE_gradlePath=/var/gradle/gradle-7.6/bin/gradle +# Absolute path to gradle executable +# for instance: /var/gradle/gradle-7.6/bin/gradle +zcee3_gradlePath= # # JAVA Options used with gradle # for instance: zCEE_gradle_JAVA_OPTS=-Xmx512m -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -zCEE_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 \ No newline at end of file +zcee3_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 + diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index 8ee408a5..ed93f25c 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -10,87 +10,109 @@ import java.nio.file.*; // define script properties @Field BuildProperties props = BuildProperties.getInstance() @Field def buildUtils= loadScript(new File("${props.zAppBuildDir}/utilities/BuildUtilities.groovy")) - + println("** Building ${argMap.buildList.size()} ${argMap.buildList.size() == 1 ? 'file' : 'files'} mapped to ${this.class.getName()}.groovy script") // verify required build properties -buildUtils.assertBuildProperties(props.zCEE_requiredBuildProperties) +buildUtils.assertBuildProperties(props.zcee3_requiredBuildProperties) // sort the build list based on build file rank if provided -List sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'zCEE_fileBuildRank') +List sortedList = buildUtils.sortBuildList(argMap.buildList.sort(), 'zcee3_fileBuildRank') int currentBuildFileNumber = 1 // iterate through build list sortedList.each { buildFile -> - println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile" - - boolean alwaysRebuildWAR = props.getFileProperty('zCEE_alwaysRebuildWAR', buildFile).toBoolean() - - String workingDir = buildFile.replace("/src/main/api/openapi.yaml", "") - String gradleBuildLocation = "build" - if (props.verbose) - println("** Path to build.gradle: ${workingDir}/${gradleBuildLocation}") - String WarLocation = "${workingDir}/build/libs/api.war" - if (props.verbose) - println("** Expected path to api.war: ${WarLocation}") - File WarFile = new File(WarLocation) - String[] command; - String commandString; - - if (alwaysRebuildWAR || !WarFile.exists()) { - println("** File api.war doesn't exist for this z/OS Connect project. Building it...") - String JAVA_OPTS = props.getFileProperty('zCEE_gradle_JAVA_OPTS', buildFile) - String gradlePath = props.getFileProperty('zCEE_gradlePath', buildFile) - String shellEnvironment = props.getFileProperty('zCEE_shellEnvironment', buildFile) - - command = [shellEnvironment, gradlePath, gradleBuildLocation] - commandString = command.join(" ") - if (props.verbose) - println("** Command to execute: ${commandString} - in working directory: ${workingDir}") - StringBuffer shellOutput = new StringBuffer() - StringBuffer shellError = new StringBuffer() - - ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); - Map env = cmd.environment(); - env.put("JAVA_OPTS", JAVA_OPTS); - cmd.directory(new File(workingDir)); - Process process = cmd.start() - process.consumeProcessOutput(shellOutput, shellError) - process.waitFor() - if (props.verbose) - println("** Exit value for the gradle build: ${process.exitValue()}"); - - if (process.exitValue() != 0) { - def errorMsg = "Error during the gradle process" - println("*! ${errorMsg}") - if (props.verbose) - println("*! gradle error message:\n${shellError}") - props.error = "true" - buildUtils.updateBuildResult(errorMsg:errorMsg) - System.exit(process.exitValue()) - } else { - if (props.verbose) - println("** gradle output:\n${shellOutput}") - } - } - if (WarFile.exists()) { - // Copy api.war to the outDir directory - File WarFileTarget = new File(props.outDir + '/' + WarLocation); - File WarTargetDir = WarFileTarget.getParentFile(); - WarTargetDir.mkdirs(); - Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); - - AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") - zCEEWARRecord.setAttribute("file", buildFile) - zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") - zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") - zCEEWARRecord.setAttribute("command", commandString); - BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) - } else { - def errorMsg = "Error when locating the api.war file" - println("*! ${errorMsg}") - props.error = "true" - buildUtils.updateBuildResult(errorMsg:errorMsg) - System.exit(process.exitValue()) - } + println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile" + + boolean alwaysRebuildWAR = (props.getFileProperty('zcee3_alwaysRebuildWAR', buildFile) == null) ? true : props.getFileProperty('zcee3_alwaysRebuildWAR', buildFile).toBoolean() + + String workingDir = buildFile.replace("/src/main/api/openapi.yaml", "") + String gradleBuildLocation = "build" + if (props.verbose) + println("** Path to build.gradle: ${workingDir}/${gradleBuildLocation}") + String WarLocation = "${workingDir}/build/libs/api.war" + if (props.verbose) + println("** Expected path to api.war: ${WarLocation}") + File WarFile = new File(WarLocation) + String[] command; + String commandString; + + // log file - Changing slashes with dots to avoid conflicts + String member = buildFile.replace("/", ".") + File logFile = new File("${props.buildOutDir}/${member}.zCEE3.log") + if (logFile.exists()) + logFile.delete() + + if (alwaysRebuildWAR || !WarFile.exists()) { + println("** The 'api.war' file was not found for this z/OS Connect project or the rebuild was forced. Building it...") + String JAVA_OPTS = props.getFileProperty('zcee3_gradle_JAVA_OPTS', buildFile) + String gradlePath = props.getFileProperty('zcee3_gradlePath', buildFile) + + File gradleExecutable = new File(gradlePath) + if (!gradleExecutable.exists()) { + def errorMsg = "gradle wasn't find at location $gradlePath." + println("*! ${errorMsg}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } + String shellEnvironment = props.getFileProperty('zcee3_shellEnvironment', buildFile) + + command = [shellEnvironment, gradlePath, gradleBuildLocation] + commandString = command.join(" ") + if (props.verbose) + println("** Executing command '${commandString}' in working directory '${workingDir}'") + StringBuffer shellOutput = new StringBuffer() + StringBuffer shellError = new StringBuffer() + + ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); + Map env = cmd.environment(); + env.put("JAVA_OPTS", JAVA_OPTS); + cmd.directory(new File(workingDir)); + Process process = cmd.start() + process.consumeProcessOutput(shellOutput, shellError) + process.waitFor() + if (props.verbose) + println("** Exit value for the gradle build: ${process.exitValue()}"); + + // write outputs to log file + String enc = props.logEncoding ?: 'IBM-1047' + logFile.withWriter(enc) { writer -> + writer.append(shellOutput) + writer.append(shellError) + } + + if (process.exitValue() != 0) { + def errorMsg = "Error during the gradle process" + println("*! ${errorMsg}") + if (props.verbose) + println("*! gradle error message:\n${shellError}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } else { + if (props.verbose) + println("** gradle output:\n${shellOutput}") + } + } else { + println("** The 'api.war' file was found for this z/OS Connect project and will be reported in the Build Report.") + } + + if (WarFile.exists()) { + // Copy api.war to the outDir directory + File WarFileTarget = new File(props.outDir + '/' + WarLocation); + File WarTargetDir = WarFileTarget.getParentFile(); + WarTargetDir.mkdirs(); + Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); + + AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") + zCEEWARRecord.setAttribute("file", buildFile) + zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") + zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") + zCEEWARRecord.setAttribute("command", commandString); + BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) + } else { + def errorMsg = "Error when locating the api.war file" + println("*! ${errorMsg}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } } \ No newline at end of file diff --git a/samples/application-conf/zCEE3.properties b/samples/application-conf/zCEE3.properties index f4b49d12..2207e554 100644 --- a/samples/application-conf/zCEE3.properties +++ b/samples/application-conf/zCEE3.properties @@ -2,24 +2,26 @@ # # Comma separated list of required build properties for zCEE3.groovy -zCEE_requiredBuildProperties=zCEE_alwaysRebuildWAR, zCEE_shellEnvironment,\ - zCEE_gradlePath, zCEE_gradle_JAVA_OPTS +zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gradle_JAVA_OPTS # # When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. # When set to false, will pick the existing WAR file if found or will build it if no WAR file is found -# zCEE_alwaysRebuildWAR=true +# When not specified, the default value is set to true +#zcee3_alwaysRebuildWAR= # # Shell environment used to run the gradle command -# zCEE_shellEnvironment=bash +#zcee3_shellEnvironment=bash # -# Path to gradle executable -# zCEE_gradlePath=/var/gradle/gradle-7.6/bin/gradle +# Absolute path to gradle executable on UNIX System Services +# for instance: /var/gradle/gradle-7.6/bin/gradle +#zcee3_gradlePath= # # JAVA Options used with gradle # for instance: zCEE_gradle_JAVA_OPTS=-Xmx512m -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -# zCEE_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 \ No newline at end of file +#zcee3_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 + From d9ec020125a7d20cc42624455c8c81616601141e Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 18 Aug 2023 09:48:12 +0200 Subject: [PATCH 06/11] Removed alwaysBuildWAR property Signed-off-by: M-DLB --- build-conf/README.md | 9 +- build-conf/zCEE3.properties | 7 -- languages/zCEE3.groovy | 124 ++++++++++------------ samples/application-conf/README.md | 7 +- samples/application-conf/zCEE3.properties | 7 -- 5 files changed, 65 insertions(+), 89 deletions(-) diff --git a/build-conf/README.md b/build-conf/README.md index 1c057713..95e9d70f 100644 --- a/build-conf/README.md +++ b/build-conf/README.md @@ -296,11 +296,10 @@ zunit_dependenciesDatasetMapping | DBB property mapping to map dependencies to d Application properties used by zAppBuild/language/zCEE3.groovy Property | Description ---- | --- | --- -zCEE_alwaysRebuildWAR | Options to rebuild WAR file -zCEE_shellEnvironment | Shell environment used to run the gradle command -zCEE_gradlePath | Path to gradle executable -zCEE_gradle_JAVA_OPTS | JAVA Options used with gradle +--- | --- +zcee3_shellEnvironment | Shell environment used to run the gradle command +zcee3_gradlePath | Path to gradle executable +zcee3_gradle_JAVA_OPTS | JAVA Options used with gradle ### CRB.properties Application properties used by zAppBuild/language/CRB.groovy diff --git a/build-conf/zCEE3.properties b/build-conf/zCEE3.properties index dad5398a..f052fdc3 100644 --- a/build-conf/zCEE3.properties +++ b/build-conf/zCEE3.properties @@ -4,13 +4,6 @@ # Comma separated list of required build properties for zCEE3.groovy zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gradle_JAVA_OPTS - -# -# When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. -# When set to false, will pick the existing WAR file if found or will build it if no WAR file is found -# When not specified, the default value is set to true -zcee3_alwaysRebuildWAR= - # # Shell environment used to run the gradle command zcee3_shellEnvironment=bash diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index ed93f25c..28ea20ed 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -24,15 +24,13 @@ int currentBuildFileNumber = 1 sortedList.each { buildFile -> println "*** (${currentBuildFileNumber++}/${sortedList.size()}) Building file $buildFile" - boolean alwaysRebuildWAR = (props.getFileProperty('zcee3_alwaysRebuildWAR', buildFile) == null) ? true : props.getFileProperty('zcee3_alwaysRebuildWAR', buildFile).toBoolean() - String workingDir = buildFile.replace("/src/main/api/openapi.yaml", "") String gradleBuildLocation = "build" if (props.verbose) println("** Path to build.gradle: ${workingDir}/${gradleBuildLocation}") String WarLocation = "${workingDir}/build/libs/api.war" if (props.verbose) - println("** Expected path to api.war: ${WarLocation}") + println("** Expected location of the 'api.war' file: ${WarLocation}") File WarFile = new File(WarLocation) String[] command; String commandString; @@ -43,76 +41,70 @@ sortedList.each { buildFile -> if (logFile.exists()) logFile.delete() - if (alwaysRebuildWAR || !WarFile.exists()) { - println("** The 'api.war' file was not found for this z/OS Connect project or the rebuild was forced. Building it...") - String JAVA_OPTS = props.getFileProperty('zcee3_gradle_JAVA_OPTS', buildFile) - String gradlePath = props.getFileProperty('zcee3_gradlePath', buildFile) + String JAVA_OPTS = props.getFileProperty('zcee3_gradle_JAVA_OPTS', buildFile) + String gradlePath = props.getFileProperty('zcee3_gradlePath', buildFile) - File gradleExecutable = new File(gradlePath) - if (!gradleExecutable.exists()) { - def errorMsg = "gradle wasn't find at location $gradlePath." - println("*! ${errorMsg}") - props.error = "true" - buildUtils.updateBuildResult(errorMsg:errorMsg) - } - String shellEnvironment = props.getFileProperty('zcee3_shellEnvironment', buildFile) + File gradleExecutable = new File(gradlePath) + if (!gradleExecutable.exists()) { + def errorMsg = "gradle wasn't find at location $gradlePath." + println("*! ${errorMsg}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } + String shellEnvironment = props.getFileProperty('zcee3_shellEnvironment', buildFile) + + command = [shellEnvironment, gradlePath, gradleBuildLocation] + commandString = command.join(" ") + if (props.verbose) + println("** Executing command '${commandString}' in working directory '${workingDir}'") + StringBuffer shellOutput = new StringBuffer() + StringBuffer shellError = new StringBuffer() + + ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); + Map env = cmd.environment(); + env.put("JAVA_OPTS", JAVA_OPTS); + cmd.directory(new File(workingDir)); + Process process = cmd.start() + process.consumeProcessOutput(shellOutput, shellError) + process.waitFor() + if (props.verbose) + println("** Exit value for the gradle build: ${process.exitValue()}"); + + // write outputs to log file + String enc = props.logEncoding ?: 'IBM-1047' + logFile.withWriter(enc) { writer -> + writer.append(shellOutput) + writer.append(shellError) + } - command = [shellEnvironment, gradlePath, gradleBuildLocation] - commandString = command.join(" ") + if (process.exitValue() != 0) { + def errorMsg = "Error during the gradle process" + println("*! ${errorMsg}") if (props.verbose) - println("** Executing command '${commandString}' in working directory '${workingDir}'") - StringBuffer shellOutput = new StringBuffer() - StringBuffer shellError = new StringBuffer() - - ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); - Map env = cmd.environment(); - env.put("JAVA_OPTS", JAVA_OPTS); - cmd.directory(new File(workingDir)); - Process process = cmd.start() - process.consumeProcessOutput(shellOutput, shellError) - process.waitFor() + println("*! gradle error message:\n${shellError}") + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } else { if (props.verbose) - println("** Exit value for the gradle build: ${process.exitValue()}"); - - // write outputs to log file - String enc = props.logEncoding ?: 'IBM-1047' - logFile.withWriter(enc) { writer -> - writer.append(shellOutput) - writer.append(shellError) - } + println("** gradle output:\n${shellOutput}") + if (WarFile.exists()) { + // Copy api.war to the outDir directory + File WarFileTarget = new File(props.outDir + '/' + WarLocation); + File WarTargetDir = WarFileTarget.getParentFile(); + WarTargetDir.mkdirs(); + Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); - if (process.exitValue() != 0) { - def errorMsg = "Error during the gradle process" + AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") + zCEEWARRecord.setAttribute("file", buildFile) + zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") + zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") + zCEEWARRecord.setAttribute("command", commandString); + BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) + } else { + def errorMsg = "Error when searching for the 'api.war' file at location '${WarLocation}'" println("*! ${errorMsg}") - if (props.verbose) - println("*! gradle error message:\n${shellError}") props.error = "true" buildUtils.updateBuildResult(errorMsg:errorMsg) - } else { - if (props.verbose) - println("** gradle output:\n${shellOutput}") - } - } else { - println("** The 'api.war' file was found for this z/OS Connect project and will be reported in the Build Report.") + } } - - if (WarFile.exists()) { - // Copy api.war to the outDir directory - File WarFileTarget = new File(props.outDir + '/' + WarLocation); - File WarTargetDir = WarFileTarget.getParentFile(); - WarTargetDir.mkdirs(); - Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); - - AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") - zCEEWARRecord.setAttribute("file", buildFile) - zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") - zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") - zCEEWARRecord.setAttribute("command", commandString); - BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) - } else { - def errorMsg = "Error when locating the api.war file" - println("*! ${errorMsg}") - props.error = "true" - buildUtils.updateBuildResult(errorMsg:errorMsg) - } } \ No newline at end of file diff --git a/samples/application-conf/README.md b/samples/application-conf/README.md index 8658b6fa..758a58d6 100644 --- a/samples/application-conf/README.md +++ b/samples/application-conf/README.md @@ -272,10 +272,9 @@ Application properties used by zAppBuild/language/zCEE3.groovy Property | Description | Overridable --- | --- | --- -zCEE_alwaysRebuildWAR | Options to rebuild WAR file | true -zCEE_shellEnvironment | Shell environment used to run the gradle command | true -zCEE_gradlePath | Path to gradle executable | true -zCEE_gradle_JAVA_OPTS | JAVA Options used with gradle | true +zcee3_shellEnvironment | Shell environment used to run the gradle command | true +zcee3_gradlePath | Path to gradle executable | true +zcee3_gradle_JAVA_OPTS | JAVA Options used with gradle | true ### CRB.properties Application properties used by zAppBuild/language/CRB.groovy diff --git a/samples/application-conf/zCEE3.properties b/samples/application-conf/zCEE3.properties index 2207e554..a4b41888 100644 --- a/samples/application-conf/zCEE3.properties +++ b/samples/application-conf/zCEE3.properties @@ -4,13 +4,6 @@ # Comma separated list of required build properties for zCEE3.groovy zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gradle_JAVA_OPTS - -# -# When set to true, always rebuild the WAR file, even if one is found in the build folder of the z/OS Connect project folder. -# When set to false, will pick the existing WAR file if found or will build it if no WAR file is found -# When not specified, the default value is set to true -#zcee3_alwaysRebuildWAR= - # # Shell environment used to run the gradle command #zcee3_shellEnvironment=bash From 8821634c56050add25603651156ca1548076cdd1 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 18 Aug 2023 10:39:13 +0200 Subject: [PATCH 07/11] Added comment for gradle Signed-off-by: Mathieu --- build-conf/zCEE3.properties | 2 +- samples/application-conf/zCEE3.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-conf/zCEE3.properties b/build-conf/zCEE3.properties index f052fdc3..3463bc06 100644 --- a/build-conf/zCEE3.properties +++ b/build-conf/zCEE3.properties @@ -9,7 +9,7 @@ zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gr zcee3_shellEnvironment=bash # -# Absolute path to gradle executable +# Absolute path to gradle executable on z/OS UNIX System Services # for instance: /var/gradle/gradle-7.6/bin/gradle zcee3_gradlePath= diff --git a/samples/application-conf/zCEE3.properties b/samples/application-conf/zCEE3.properties index a4b41888..651f7943 100644 --- a/samples/application-conf/zCEE3.properties +++ b/samples/application-conf/zCEE3.properties @@ -9,7 +9,7 @@ zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gr #zcee3_shellEnvironment=bash # -# Absolute path to gradle executable on UNIX System Services +# Absolute path to gradle executable on z/OS UNIX System Services # for instance: /var/gradle/gradle-7.6/bin/gradle #zcee3_gradlePath= From a71b8b5339a623120f7bb3b2259dc95ab333bf11 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 18 Aug 2023 10:58:05 +0200 Subject: [PATCH 08/11] Updated script and properties Signed-off-by: Mathieu --- languages/zCEE3.groovy | 105 +++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index 28ea20ed..75a6b040 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -46,65 +46,66 @@ sortedList.each { buildFile -> File gradleExecutable = new File(gradlePath) if (!gradleExecutable.exists()) { - def errorMsg = "gradle wasn't find at location $gradlePath." - println("*! ${errorMsg}") + def errorMsg = "*! gradle wasn't find at location '$gradlePath'" + println(errorMsg) props.error = "true" buildUtils.updateBuildResult(errorMsg:errorMsg) - } - String shellEnvironment = props.getFileProperty('zcee3_shellEnvironment', buildFile) - - command = [shellEnvironment, gradlePath, gradleBuildLocation] - commandString = command.join(" ") - if (props.verbose) - println("** Executing command '${commandString}' in working directory '${workingDir}'") - StringBuffer shellOutput = new StringBuffer() - StringBuffer shellError = new StringBuffer() + } else { + String shellEnvironment = props.getFileProperty('zcee3_shellEnvironment', buildFile) - ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); - Map env = cmd.environment(); - env.put("JAVA_OPTS", JAVA_OPTS); - cmd.directory(new File(workingDir)); - Process process = cmd.start() - process.consumeProcessOutput(shellOutput, shellError) - process.waitFor() - if (props.verbose) - println("** Exit value for the gradle build: ${process.exitValue()}"); - - // write outputs to log file - String enc = props.logEncoding ?: 'IBM-1047' - logFile.withWriter(enc) { writer -> - writer.append(shellOutput) - writer.append(shellError) - } - - if (process.exitValue() != 0) { - def errorMsg = "Error during the gradle process" - println("*! ${errorMsg}") + command = [shellEnvironment, gradlePath, gradleBuildLocation] + commandString = command.join(" ") if (props.verbose) - println("*! gradle error message:\n${shellError}") - props.error = "true" - buildUtils.updateBuildResult(errorMsg:errorMsg) - } else { + println("** Executing command '${commandString}' in working directory '${workingDir}'...") + StringBuffer shellOutput = new StringBuffer() + StringBuffer shellError = new StringBuffer() + + ProcessBuilder cmd = new ProcessBuilder(shellEnvironment, gradlePath, gradleBuildLocation); + Map env = cmd.environment(); + env.put("JAVA_OPTS", JAVA_OPTS); + cmd.directory(new File(workingDir)); + Process process = cmd.start() + process.consumeProcessOutput(shellOutput, shellError) + process.waitFor() if (props.verbose) - println("** gradle output:\n${shellOutput}") - if (WarFile.exists()) { - // Copy api.war to the outDir directory - File WarFileTarget = new File(props.outDir + '/' + WarLocation); - File WarTargetDir = WarFileTarget.getParentFile(); - WarTargetDir.mkdirs(); - Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); + println("** Exit value for the gradle build: ${process.exitValue()}"); + + // write outputs to log file + String enc = props.logEncoding ?: 'IBM-1047' + logFile.withWriter(enc) { writer -> + writer.append(shellOutput) + writer.append(shellError) + } - AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") - zCEEWARRecord.setAttribute("file", buildFile) - zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") - zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") - zCEEWARRecord.setAttribute("command", commandString); - BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) - } else { - def errorMsg = "Error when searching for the 'api.war' file at location '${WarLocation}'" - println("*! ${errorMsg}") + if (process.exitValue() != 0) { + def errorMsg = "*! Error during the gradle process" + println(errorMsg) + if (props.verbose) + println("*! gradle error message:\n${shellError}") props.error = "true" buildUtils.updateBuildResult(errorMsg:errorMsg) - } + } else { + if (props.verbose) + println("** gradle output:\n${shellOutput}") + if (WarFile.exists()) { + // Copy api.war to the outDir directory + File WarFileTarget = new File(props.outDir + '/' + WarLocation); + File WarTargetDir = WarFileTarget.getParentFile(); + WarTargetDir.mkdirs(); + Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); + + AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") + zCEEWARRecord.setAttribute("file", buildFile) + zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") + zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") + zCEEWARRecord.setAttribute("command", commandString); + BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) + } else { + def errorMsg = "*! Error when searching for the 'api.war' file at location '${WarLocation}'" + println(errorMsg) + props.error = "true" + buildUtils.updateBuildResult(errorMsg:errorMsg) + } + } } } \ No newline at end of file From c687f4b53d467a5d1c3bb33f502a76e33865a102 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Mon, 28 Aug 2023 10:20:18 +0200 Subject: [PATCH 09/11] Changed the USS_RECORD output field Signed-off-by: Mathieu --- languages/zCEE3.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index 75a6b040..c97ca118 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -97,7 +97,7 @@ sortedList.each { buildFile -> AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") zCEEWARRecord.setAttribute("file", buildFile) zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") - zCEEWARRecord.setAttribute("outputs", "[${props.outDir}/${WarLocation}, zCEE3]") + zCEEWARRecord.setAttribute("outputs", "[${props.outDir}, $WarLocation, zCEE3]") zCEEWARRecord.setAttribute("command", commandString); BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) } else { @@ -108,4 +108,4 @@ sortedList.each { buildFile -> } } } -} \ No newline at end of file +} From a9cff9738a20edb32ce78ed2500592b6544efb84 Mon Sep 17 00:00:00 2001 From: M-DLB Date: Thu, 31 Aug 2023 14:03:41 +0200 Subject: [PATCH 10/11] Changed the location of the output file Signed-off-by: M-DLB --- languages/zCEE3.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/zCEE3.groovy b/languages/zCEE3.groovy index c97ca118..8c3461f4 100644 --- a/languages/zCEE3.groovy +++ b/languages/zCEE3.groovy @@ -88,8 +88,8 @@ sortedList.each { buildFile -> if (props.verbose) println("** gradle output:\n${shellOutput}") if (WarFile.exists()) { - // Copy api.war to the outDir directory - File WarFileTarget = new File(props.outDir + '/' + WarLocation); + // Copy api.war to the buildOutDir directory + File WarFileTarget = new File(props.buildOutDir + '/zCEE3/' + WarLocation); File WarTargetDir = WarFileTarget.getParentFile(); WarTargetDir.mkdirs(); Files.copy(WarFile.toPath(), WarFileTarget.toPath(), StandardCopyOption.COPY_ATTRIBUTES); @@ -97,7 +97,7 @@ sortedList.each { buildFile -> AnyTypeRecord zCEEWARRecord = new AnyTypeRecord("USS_RECORD") zCEEWARRecord.setAttribute("file", buildFile) zCEEWARRecord.setAttribute("label", "z/OS Connect EE OpenAPI 3 YAML definition") - zCEEWARRecord.setAttribute("outputs", "[${props.outDir}, $WarLocation, zCEE3]") + zCEEWARRecord.setAttribute("outputs", "[${props.buildOutDir}, zCEE3/$WarLocation, zCEE3]") zCEEWARRecord.setAttribute("command", commandString); BuildReportFactory.getBuildReport().addRecord(zCEEWARRecord) } else { From dfba0ed7c26056435b42beaae92976acbc54d40f Mon Sep 17 00:00:00 2001 From: Mathieu Dalbin Date: Fri, 1 Sep 2023 09:26:02 +0200 Subject: [PATCH 11/11] Fixed few issues with properties documentation Signed-off-by: Mathieu Dalbin --- build-conf/README.md | 2 +- build-conf/build.properties | 6 +++--- samples/application-conf/README.md | 9 --------- samples/application-conf/zCEE3.properties | 20 -------------------- 4 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 samples/application-conf/zCEE3.properties diff --git a/build-conf/README.md b/build-conf/README.md index 95e9d70f..6d47b3ad 100644 --- a/build-conf/README.md +++ b/build-conf/README.md @@ -292,7 +292,7 @@ zunit_reportDatasets | Comma separated list of 'report' type data sets zunit_reportOptions | BPXWDYN creation options for creating 'report' type data sets zunit_dependenciesDatasetMapping | DBB property mapping to map dependencies to different target datasets -### zCEE3.Properties +### zCEE3.properties Application properties used by zAppBuild/language/zCEE3.groovy Property | Description diff --git a/build-conf/build.properties b/build-conf/build.properties index 055e3df3..7809211b 100644 --- a/build-conf/build.properties +++ b/build-conf/build.properties @@ -15,7 +15,7 @@ buildPropFiles=datasets.properties,dependencyReport.properties,Assembler.properties,BMS.properties,\ MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,\ LinkEdit.properties,PLI.properties,REXX.properties,ZunitConfig.properties,Transfer.properties,\ -CRB.properties +CRB.properties,zCEE3.properties # # Comma separated list of default application configuration property files to load @@ -67,7 +67,7 @@ buildOutputTSformat=yyyyMMdd.HHmmss.mmm # # Minimum required DBB ToolkitVersion to run this version of zAppBuild -# Build initialization process validates the DBB Toolkit Version in use and matches that against this setting +# Build initialization process validates the DBB Toolkit Version in use and matches that against this setting requiredDBBToolkitVersion=2.0.0 # @@ -94,7 +94,7 @@ metadataStoreType=file #metadataStoreDb2Url=jdbc:db2: # Db2 connection configuration property file -# Sample is povided at $DBB_HOME/conf/db2Connection.conf +# Sample is povided at $DBB_HOME/conf/db2Connection.conf #metadataStoreDb2ConnectionConf= diff --git a/samples/application-conf/README.md b/samples/application-conf/README.md index 758a58d6..c4ff9576 100644 --- a/samples/application-conf/README.md +++ b/samples/application-conf/README.md @@ -267,15 +267,6 @@ zunit_CodeCoverageHost | Headless Code Coverage Collector host (if not specified zunit_CodeCoveragePort | Headless Code Coverage Collector port (if not specified IDz will be used for reporting) | true zunit_CodeCoverageOptions | Headless Code Coverage Collector Options | true -### zCEE3.Properties -Application properties used by zAppBuild/language/zCEE3.groovy - -Property | Description | Overridable ---- | --- | --- -zcee3_shellEnvironment | Shell environment used to run the gradle command | true -zcee3_gradlePath | Path to gradle executable | true -zcee3_gradle_JAVA_OPTS | JAVA Options used with gradle | true - ### CRB.properties Application properties used by zAppBuild/language/CRB.groovy diff --git a/samples/application-conf/zCEE3.properties b/samples/application-conf/zCEE3.properties deleted file mode 100644 index 651f7943..00000000 --- a/samples/application-conf/zCEE3.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Releng properties used by language/zCEE3.groovy - -# -# Comma separated list of required build properties for zCEE3.groovy -zcee3_requiredBuildProperties=zcee3_shellEnvironment, zcee3_gradlePath, zcee3_gradle_JAVA_OPTS - -# -# Shell environment used to run the gradle command -#zcee3_shellEnvironment=bash - -# -# Absolute path to gradle executable on z/OS UNIX System Services -# for instance: /var/gradle/gradle-7.6/bin/gradle -#zcee3_gradlePath= - -# -# JAVA Options used with gradle -# for instance: zCEE_gradle_JAVA_OPTS=-Xmx512m -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -#zcee3_gradle_JAVA_OPTS=-Dfile.encoding=UTF-8 -