Skip to content

Commit dd59b05

Browse files
authored
Merge pull request #456 from IBM/develop
Release zAppBuild 3.6.0
2 parents d177891 + c05f9e3 commit dd59b05

23 files changed

+922
-169
lines changed

build-conf/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,16 @@ zcee3_shellEnvironment | Shell environment used to run the gradle command
301301
zcee3_gradlePath | Path to gradle executable
302302
zcee3_gradle_JAVA_OPTS | JAVA Options used with gradle
303303

304+
### zCEE2.properties
305+
Application properties used by zAppBuild/language/zCEE2.groovy
306+
307+
Property | Description
308+
--- | ---
309+
zcee2_zconbtPath | Absolute path to zconbt executable on z/OS UNIX System Services
310+
zcee2_JAVA_HOME | Java installation used by the zconbt utility
311+
zcee2_inputType | Mapping of input files with types of files
312+
zcee2_ARA_PackageArtifacts | Flag to indicate if artifacts produced for the ARA processing should be packaged
313+
304314
### CRB.properties
305315
Application properties used by zAppBuild/language/CRB.groovy
306316

build-conf/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
buildPropFiles=datasets.properties,dependencyReport.properties,Assembler.properties,BMS.properties,\
2020
MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,\
2121
LinkEdit.properties,PLI.properties,REXX.properties,ZunitConfig.properties,Transfer.properties,\
22-
CRB.properties,zCEE3.properties
22+
CRB.properties,zCEE3.properties,zCEE2.properties
2323

2424
#
2525
# Comma separated list of default application configuration property files to load

build-conf/zCEE2.properties

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Releng properties used by language/zCEE2.groovy
2+
3+
#
4+
# Comma separated list of required build properties for zCEE3.groovy
5+
zcee2_requiredBuildProperties=zcee2_zconbtPath,zcee2_JAVA_HOME
6+
7+
#
8+
# Absolute path to zconbt executable on z/OS UNIX System Services
9+
# for instance: /var/zosconnect/v359/bin/zconbt.zos
10+
zcee2_zconbtPath=
11+
12+
#
13+
# Java installation used by the zconbt utility
14+
# for instance: /usr/lpp/java/J8.0_64
15+
zcee2_JAVA_HOME=
16+
17+
#
18+
# Mapping of input files with types of files
19+
# PROJECT can be used for SAR and AAR projects
20+
# SAR and ARA can be used for SAR Properties files and ARA properties files
21+
# Can be overridden by file-level properties
22+
zcee2_inputType=PROJECT
23+
24+
#
25+
# Flag to indicate if artifacts produced for the ARA processing should be packaged (generated copybooks, API information copybook and logs)
26+
# When set to true, the artifacts are located based on the dataStructuresLocation, apiInfoFileLocation and logFileDirectory properties of the ARA properties files
27+
# When not defined, the default value is false and artifacts are packaged
28+
zcee2_ARA_PackageArtifacts=true

build.groovy

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ props.startTime = startTime.format("yyyyMMdd.HHmmss.SSS")
3131
println("\n** Build start at $props.startTime")
3232

3333
// initialize build
34-
initializeBuildProcess(args)
34+
try {
35+
initializeBuildProcess(args)
36+
} catch ( AssertionError e ) {
37+
String errorMsg = e.getMessage()
38+
println(errorMsg)
39+
props.error = "true"
40+
buildUtils.updateBuildResult(errorMsg:errorMsg)
41+
finalizeBuildProcess(start:startTime, 0)
42+
}
3543

3644
// create build list
3745
List<String> buildList = new ArrayList()
@@ -57,13 +65,21 @@ else {
5765
scriptPath = script
5866
// Use the ScriptMappings class to get the files mapped to the build script
5967
def buildFiles = ScriptMappings.getMappedList(script, buildList)
60-
if (buildFiles.size() > 0) {
61-
if (scriptPath.startsWith('/'))
62-
runScript(new File("${scriptPath}"), ['buildList':buildFiles])
63-
else
64-
runScript(new File("languages/${scriptPath}"), ['buildList':buildFiles])
68+
try {
69+
if (buildFiles.size() > 0) {
70+
if (scriptPath.startsWith('/'))
71+
runScript(new File("${scriptPath}"), ['buildList':buildFiles])
72+
else
73+
runScript(new File("languages/${scriptPath}"), ['buildList':buildFiles])
74+
}
75+
processCounter = processCounter + buildFiles.size()
76+
} catch (BuildException | AssertionError e ) {
77+
String errorMsg = e.getMessage()
78+
println(errorMsg)
79+
props.error = "true"
80+
buildUtils.updateBuildResult(errorMsg:errorMsg)
81+
finalizeBuildProcess(start:startTime, count:processCounter)
6582
}
66-
processCounter = processCounter + buildFiles.size()
6783
}
6884
} else if(props.scanLoadmodules && props.scanLoadmodules.toBoolean()){
6985
println ("** Scanning load modules.")
@@ -77,10 +93,6 @@ if (processCounter == 0)
7793

7894
finalizeBuildProcess(start:startTime, count:processCounter)
7995

80-
// if error occurred signal process error
81-
if (props.error)
82-
System.exit(1)
83-
8496
// end script
8597

8698

@@ -96,10 +108,17 @@ def initializeBuildProcess(String[] args) {
96108

97109
// print and store property dbb toolkit version in use
98110
def dbbToolkitVersion = VersionInfo.getInstance().getVersion()
99-
props.dbbToolkitVersion = dbbToolkitVersion
100111
def dbbToolkitBuildDate = VersionInfo.getInstance().getDate()
101-
if (props.verbose) println "** zAppBuild running on DBB Toolkit Version ${dbbToolkitVersion} ${dbbToolkitBuildDate} "
112+
props.dbbToolkitVersion = dbbToolkitVersion
113+
props.dbbToolkitBuildDate = dbbToolkitBuildDate
102114

115+
File versionFile = new File("${props.zAppBuildDir}/version.properties")
116+
if (versionFile.exists()) {
117+
props.load(versionFile)
118+
if (props.zappbuild_version) println "** Running zAppBuild Version ${props.zappbuild_version} "
119+
}
120+
if (props.verbose) println "** Running DBB Toolkit Version ${dbbToolkitVersion} ${dbbToolkitBuildDate} "
121+
103122
// verify required dbb toolkit
104123
buildUtils.assertDbbBuildToolkitVersion(props.dbbToolkitVersion, props.requiredDBBToolkitVersion)
105124

@@ -329,6 +348,8 @@ def populateBuildProperties(def opts) {
329348
// need to support IDz user build parameters
330349
if (opts.srcDir) props.workspace = opts.srcDir
331350
if (opts.wrkDir) props.outDir = opts.wrkDir
351+
352+
// assert workspace
332353
buildUtils.assertBuildProperties('workspace,outDir')
333354

334355
// load build.properties
@@ -641,7 +662,8 @@ def createBuildList() {
641662
}
642663

643664
// Perform analysis and build report of external impacts
644-
if (props.reportExternalImpacts && props.reportExternalImpacts.toBoolean()){
665+
// Prereq: Metadatastore Connection
666+
if (metadataStore && props.reportExternalImpacts && props.reportExternalImpacts.toBoolean()){
645667
if (buildSet && changedFiles) {
646668
println "** Perform analysis and reporting of external impacted files for the build list including changed files."
647669
reportingUtils.reportExternalImpacts(buildSet.plus(changedFiles))
@@ -653,7 +675,8 @@ def createBuildList() {
653675
}
654676

655677
// Document and validate concurrent changes
656-
if (props.reportConcurrentChanges && props.reportConcurrentChanges.toBoolean()){
678+
// Prereq: Workspace containing git repos. Skipped for --userBuild build type
679+
if (!props.userBuild && props.reportConcurrentChanges && props.reportConcurrentChanges.toBoolean()){
657680
println "** Calculate and document concurrent changes."
658681
reportingUtils.calculateConcurrentChanges(buildSet)
659682
}
@@ -670,7 +693,6 @@ def createBuildList() {
670693
return buildList
671694
}
672695

673-
674696
def finalizeBuildProcess(Map args) {
675697
println "***************** Finalization of the build process *****************"
676698

@@ -722,7 +744,10 @@ def finalizeBuildProcess(Map args) {
722744
buildResult.setProperty("filesProcessed", String.valueOf(args.count))
723745
buildResult.setState(buildResult.COMPLETE)
724746

725-
747+
// add zAppBuild and DBB toolkit version info
748+
if (props.zappbuild_version) buildResult.setProperty("zAppBuildVersion", props.zappbuild_version)
749+
buildResult.setProperty("DBBToolkitVersion" , "${props.dbbToolkitVersion} ${props.dbbToolkitBuildDate}")
750+
726751
// store build result properties in BuildReport.json
727752
PropertiesRecord buildReportRecord = new PropertiesRecord("DBB.BuildResultProperties")
728753
def buildResultProps = buildResult.getPropertyNames()
@@ -769,6 +794,10 @@ def finalizeBuildProcess(Map args) {
769794
if (props.preview) println("** Build ran in preview mode.")
770795
println("** Total files processed : ${args.count}")
771796
println("** Total build time : $duration\n")
797+
798+
// if error occurred signal process error
799+
if (props.error)
800+
System.exit(1)
772801
}
773802

774803

languages/Assembler.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,9 @@ def createLinkEditCommand(String buildFile, LogicalFile logicalFile, String memb
458458
if (buildUtils.isCICS(logicalFile))
459459
linkedit.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
460460

461+
if (buildUtils.isIMS(logicalFile))
462+
linkedit.dd(new DDStatement().dsn(props.SDFSRESL).options("shr"))
463+
461464
if (buildUtils.isSQL(logicalFile))
462465
linkedit.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
463466

languages/Cobol.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def createCompileCommand(String buildFile, LogicalFile logicalFile, String membe
197197

198198
compile.dd(new DDStatement().name("SYSPRINT").options(props.cobol_printTempOptions))
199199
compile.dd(new DDStatement().name("SYSMDECK").options(props.cobol_tempOptions))
200-
(1..17).toList().each { num ->
200+
(1..15).toList().each { num ->
201201
compile.dd(new DDStatement().name("SYSUT$num").options(props.cobol_tempOptions))
202202
}
203203

@@ -384,6 +384,9 @@ def createLinkEditCommand(String buildFile, LogicalFile logicalFile, String memb
384384
if (buildUtils.isCICS(logicalFile))
385385
linkedit.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
386386

387+
if (buildUtils.isIMS(logicalFile))
388+
linkedit.dd(new DDStatement().dsn(props.SDFSRESL).options("shr"))
389+
387390
if (buildUtils.isSQL(logicalFile))
388391
linkedit.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
389392

languages/LinkEdit.groovy

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,16 @@ def createLinkEditCommand(String buildFile, LogicalFile logicalFile, String memb
109109
linkedit.dd(new DDStatement().dsn(syslibDataset).options("shr"))
110110
}
111111
linkedit.dd(new DDStatement().dsn(props.SCEELKED).options("shr"))
112-
112+
113113
if (props.debug && props.SEQAMOD)
114114
linkedit.dd(new DDStatement().dsn(props.SEQAMOD).options("shr"))
115-
116-
if (props.SDFHLOAD)
115+
116+
if (buildUtils.isCICS(logicalFile))
117117
linkedit.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
118-
118+
119+
if (buildUtils.isIMS(logicalFile))
120+
linkedit.dd(new DDStatement().dsn(props.SDFSRESL).options("shr"))
121+
119122
if (props.SDSNLOAD)
120123
linkedit.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
121124

languages/PLI.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def createPLIParms(String buildFile, LogicalFile logicalFile) {
129129
def parms = props.getFileProperty('pli_compileParms', buildFile) ?: ""
130130
def cics = props.getFileProperty('pli_compileCICSParms', buildFile) ?: ""
131131
def sql = props.getFileProperty('pli_compileSQLParms', buildFile) ?: ""
132+
def ims = props.getFileProperty('pli_compileIMSParms', buildFile) ?: ""
132133
def errPrefixOptions = props.getFileProperty('pli_compileErrorPrefixParms', buildFile) ?: ""
133134
def compileDebugParms = props.getFileProperty('pli_compileDebugParms', buildFile)
134135

@@ -142,6 +143,9 @@ def createPLIParms(String buildFile, LogicalFile logicalFile) {
142143
if (props.errPrefix)
143144
parms = "$parms,$errPrefixOptions"
144145

146+
if (buildUtils.isIMS(logicalFile))
147+
parms = "$parms,$ims"
148+
145149
// add debug options
146150
if (props.debug) {
147151
parms = "$parms,$compileDebugParms"
@@ -355,6 +359,9 @@ def createLinkEditCommand(String buildFile, LogicalFile logicalFile, String memb
355359
if (buildUtils.isCICS(logicalFile))
356360
linkedit.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
357361

362+
if (buildUtils.isIMS(logicalFile))
363+
linkedit.dd(new DDStatement().dsn(props.SDFSRESL).options("shr"))
364+
358365
if (buildUtils.isSQL(logicalFile))
359366
linkedit.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
360367

languages/Transfer.groovy

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ buildList.each { buildFile ->
122122
buildUtils.updateBuildResult(errorMsg:errorMsg)
123123
}
124124
} catch (BuildException e) { // Catch potential exceptions like file truncation
125-
String errorMsg = "*! The CopyToPDS failed with an exception ${e.getMessage()}."
126-
println(errorMsg)
127-
props.error = "true"
128-
buildUtils.updateBuildResult(errorMsg:errorMsg)
125+
String errorMsg = "*! (Transfer.groovy) CopyToPDS of file ${buildFile} failed with an exception \n ${e.getMessage()}."
126+
throw new BuildException(errorMsg)
129127
}
130128
} else {
131129
String errorMsg = "*! Target dataset for $buildFile could not be obtained from file properties. "

0 commit comments

Comments
 (0)