Skip to content

Commit f70b0a4

Browse files
authored
Fix PackageBuildOutputs.groovy from overriding activated settings via by properties file (#273)
* Fix PackageBuildOutputs.groovy from overriding activated settings via by properties file Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
1 parent fff4dde commit f70b0a4

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Pipeline/PackageBuildOutputs/PackageBuildOutputs.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -703,18 +703,19 @@ def parseInput(String[] cliArgs){
703703
if (opts.a) props.application = opts.a
704704
if (opts.b) props.branch = opts.b
705705

706-
props.generateWaziDeployAppManifest = (opts.wd) ? 'true' : false
707-
708-
props.addExtension = (opts.ae) ? 'true' : 'false'
706+
// cli overrides defaults set in 'packageBuildOutputs.properties'
707+
props.generateWaziDeployAppManifest = (opts.wd) ? 'true' : props.generateWaziDeployAppManifest
708+
props.addExtension = (opts.ae) ? 'true' : props.addExtension
709+
props.publish = (opts.p) ? 'true' : props.publish
710+
props.generateSBOM = (opts.sbom) ? 'true' : props.generateSBOM
711+
709712
props.verbose = (opts.verb) ? 'true' : 'false'
710713

711714
// default log encoding if not specified via config passed in via --properties
712715
if (!props.fileEncoding) props.fileEncoding = "IBM-1047"
713716

714717
// Optional Artifact repository info to deploy package
715-
716718
if (opts.v) props.versionName = opts.v
717-
props.publish = (opts.p) ? 'true' : 'false'
718719

719720
// read of artifact repository file
720721
if (opts.aprop) {
@@ -763,7 +764,6 @@ def parseInput(String[] cliArgs){
763764
}
764765
props.buildReportOrder = buildReports
765766

766-
props.generateSBOM = (opts.sbom) ? 'true' : 'false'
767767
if (opts.sbomAuthor) {
768768
props.sbomAuthor = opts.sbomAuthor
769769
}

Pipeline/PackageBuildOutputs/packageBuildOutputs.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ addExtension=false
3030
# Default: false
3131
generateWaziDeployAppManifest=false
3232

33+
# Boolean setting to define if SBOM based on cycloneDX should be generated
34+
# Please note that the cli option `generateSBOM` can override this setting and activate it.
35+
# Requires the classpath to contain the cycloneDX libs
36+
# Default: false
37+
generateSBOM=false
38+
39+
# Boolean setting to define if the ArtifactPublisherHelpers should be invoked to upload the package to the configured
40+
# binary artifact repository, see appArtifactRepository.properties (--artifactRepositoryPropertyFile) or the individual configurations
41+
# Please note that the cli option `publish` can override this setting and activate it.
42+
# Default: false
43+
publish=false
44+
3345
# Name of the default tarFileName
3446
# When processing a single build report, the DBB Build report label it used as the tar file name
3547
# When processing multiple build report, 'Default' is used as the tar file name

0 commit comments

Comments
 (0)