Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing timestamp issue and adding decoration #425

Merged
merged 4 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build-conf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ applicationDefaultPropFiles | Comma separated list of default application confi
buildListFileExt | File extension that indicates the build file is really a build list.
applicationConfRootDir | Alternate root directory for application-conf location. Allows for the deployment of the application-conf directories to a static location. Defaults to ${workspace}/${application}
createBuildOutputSubfolder | Option to create a subfolder with the build label within the build output dir (outDir). Default: true.
buildOutputTSformat | Defines the build timestamp format for build output subfolder and build label.
requiredDBBToolkitVersion | Minimum required DBB ToolkitVersion to run this version of zAppBuild.
requiredBuildProperties | Comma separated list of required build properties for zAppBuild/build.groovy. Build and language scripts will validate that *required* build properties have been set before the script runs. If any are missing or empty, then a validation error will be thrown.
dbb.file.tagging | Controls compile log and build report file tagging. Default: true.
Expand Down
24 changes: 9 additions & 15 deletions build-conf/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Supports both relative path (to zAppBuild/build-conf/) and absolute path
#
# These properties files expect to contain centrally managed defaults
# such as system datasets, language script specific settings
# such as system datasets, language script specific settings
#
buildPropFiles=datasets.properties,dependencyReport.properties,Assembler.properties,BMS.properties,\
MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,\
Expand All @@ -24,14 +24,14 @@ CRB.properties,zCEE3.properties
#
# Comma separated list of default application configuration property files to load
# Supports both relative path (to zAppBuild/build-conf/) and absolute path
#
#
# These properties files expect to contain centrally managed defaults
# and also may reference properties files containing configuration
# of the language script configurations such as return codes, deploy types
#
# of the language script configurations such as return codes, deploy types
#
# See also application-conf/application.properties#applicationPropFiles
#
# default:
#
# default:
# applicationDefaultPropFiles=defaultzAppBuildConf.properties
#
# extended sample to set default language script configurations:
Expand All @@ -45,7 +45,7 @@ CRB.properties,zCEE3.properties
# default-application-conf/Transfer.properties,\
# default-application-conf/LinkEdit.properties,\
# default-application-conf/ZunitConfig.properties
#
#
applicationDefaultPropFiles=defaultzAppBuildConf.properties

#
Expand All @@ -58,7 +58,7 @@ applicationDefaultPropFiles=defaultzAppBuildConf.properties
# a sample of the application-conf can be found in
# samples/application-conf
#
# zAppBuild expects a file called application.properties in this directory.
# zAppBuild expects a file called application.properties in this directory.
#
# The property also allows for the deployment of
# the application-conf directories to an alternate location rather
Expand All @@ -69,7 +69,7 @@ applicationDefaultPropFiles=defaultzAppBuildConf.properties
# based on workspace + application and application-conf
#
# applicationConfDir=${workspace}/${application}/application-conf
#
#
#
# Example: Static location on USS
# applicationConfDir=/u/build/config/applications/${application}/application-conf
Expand Down Expand Up @@ -101,12 +101,6 @@ buildListFileExt=txt
# Default: true
createBuildOutputSubfolder=true

#
# Build Timestamp Format
# Applies to all build types except userBuild
# Default: yyyyMMdd.HHmmss.mmm - See Date format method pattern strings
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
Expand Down
13 changes: 7 additions & 6 deletions build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import groovy.cli.commons.*
@Field startTime = new Date()

// start time message
props.startTime = startTime.format("yyyyMMdd.hhmmss.mmm")
props.startTime = startTime.format("yyyyMMdd.HHmmss.SSS")
println("\n** Build start at $props.startTime")

// initialize build
Expand Down Expand Up @@ -89,7 +89,7 @@ if (props.error)
//********************************************************************

def initializeBuildProcess(String[] args) {
if (props.verbose) println "** Initializing build process . . ."
println "**************** Initialization of the build process ****************"

def opts = parseArgs(args) // parse incoming options and arguments
populateBuildProperties(opts) // build properties initial set
Expand Down Expand Up @@ -294,8 +294,8 @@ options:
System.exit(1)
}

if(opts.v && args.size() > 1)
println "** Input args = ${args[1..-1].join(' ')}"
if(opts.v && args.size() > 0)
println "** Input args = ${args[0..-1].join(' ')}"

if( (!opts.cch && opts.ccp) || (opts.cch && !opts.ccp) ) {
println "** --cccHost and --cccPort options are mutual"
Expand Down Expand Up @@ -490,7 +490,7 @@ def populateBuildProperties(def opts) {

props.topicBranchBuild = (props.applicationCurrentBranch.equals(props.mainBuildBranch)) ? null : 'true'
props.applicationBuildGroup = ((props.applicationCurrentBranch) ? "${props.application}-${props.applicationCurrentBranch}" : "${props.application}") as String
props.applicationBuildLabel = ("build." + ( (props.buildOutputTSformat) ? startTime.format("${props.buildOutputTSformat}") : "${props.startTime}" ) ) as String
props.applicationBuildLabel = ("build.${props.startTime}") as String
props.applicationCollectionName = ((props.applicationCurrentBranch) ? "${props.application}-${props.applicationCurrentBranch}" : "${props.application}") as String
props.applicationOutputsCollectionName = "${props.applicationCollectionName}-outputs" as String

Expand Down Expand Up @@ -526,6 +526,7 @@ def populateBuildProperties(def opts) {
* - build text file: Contains a list of programs from a text file. Provide a *.txt build file argument.
*/
def createBuildList() {
println "************* Creation and processing of the build list *************"

// using a set to create build list to eliminate duplicate files
Set<String> buildSet = new HashSet<String>()
Expand Down Expand Up @@ -671,7 +672,7 @@ def createBuildList() {


def finalizeBuildProcess(Map args) {

println "***************** Finalization of the build process *****************"

def buildReport = BuildReportFactory.getBuildReport()
def buildResult = null
Expand Down