Skip to content

Commit

Permalink
Correction when loading individual file properties (#228)
Browse files Browse the repository at this point in the history
* Update loadFileLevelProperties utility method to

address scenario when loadFileLevelProperties build properties is
not set in application-conf
  • Loading branch information
dennis-behm authored Jun 14, 2022
1 parent 2186911 commit a4e1b99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,10 @@ def createBuildList() {
}

// Loading file/member level properties from member specific properties files
println "** Populate file level properties from individual property files."
buildUtils.loadFileLevelPropertiesFromFile(buildList)
if (props.filePropertyValueKeySet().getAt("loadFileLevelProperties") || props.loadFileLevelProperties) {
println "** Populating file level properties from individual property files."
buildUtils.loadFileLevelPropertiesFromFile(buildList)
}

return [buildList, deleteList]
}
Expand Down
3 changes: 2 additions & 1 deletion utilities/BuildUtilities.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ def loadFileLevelPropertiesFromFile(List<String> buildList) {
buildList.each { String buildFile ->

// check for file level overwrite
if (props.getFileProperty('loadFileLevelProperties', buildFile).toBoolean()) {
loadFileLevelProperties = props.getFileProperty('loadFileLevelProperties', buildFile)
if (loadFileLevelProperties && loadFileLevelProperties.toBoolean()) {

String member = new File(buildFile).getName()
String propertyFilePath = props.getFileProperty('propertyFilePath', buildFile)
Expand Down

0 comments on commit a4e1b99

Please sign in to comment.