From 2fd724142da857efd571cc78620ccf69724deb1b Mon Sep 17 00:00:00 2001 From: Samuel Bernardo Date: Fri, 4 Dec 2020 10:10:58 +0000 Subject: [PATCH] pipelineConfig: test config for bad syntax and apply the defaults Signed-off-by: Samuel Bernardo --- vars/pipelineConfig.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vars/pipelineConfig.groovy b/vars/pipelineConfig.groovy index f80669d6..12676804 100644 --- a/vars/pipelineConfig.groovy +++ b/vars/pipelineConfig.groovy @@ -25,7 +25,8 @@ def call( Map scmConfigsDefault = [ localBranch: false ] - Map scmConfigs = scmConfigsDefault + configs?.scmConfigs + Map scmConfigs = configs ? scmConfigsDefault + configs?.scmConfigs : + scmConfigsDefault Map configsDefault = [ configFile: './.sqa/config.yml', @@ -35,7 +36,8 @@ def call( validatorDockerImage: 'eoscsynergy/jpl-validator:1.1.0', scmConfigs: scmConfigs, ] - configs = configsDefault + configs + configs = configs ? configsDefault + configs : + configsDefault def scmCheckout = { -> if (configs?.baseRepository) {