diff --git a/devops/jobs/CheckPrimaryKeys.groovy b/devops/jobs/CheckPrimaryKeys.groovy index 653c1e998..91937f1db 100644 --- a/devops/jobs/CheckPrimaryKeys.groovy +++ b/devops/jobs/CheckPrimaryKeys.groovy @@ -38,12 +38,17 @@ class CheckPrimaryKeys { rdsignore = "${rdsignore}-i ${ignore} " } + def whitelistregions = "" + configuration.REGION_LIST.each { include -> + whitelistregions = "${whitelistregions}-r ${include} " + } + environmentVariables { env('ENVIRONMENT', environment) env('DEPLOYMENT', deployment) env('AWS_DEFAULT_REGION', extraVars.get('REGION')) env('RDSIGNORE', rdsignore) - + env('WHITELISTREGIONS', whitelistregions) } multiscm { diff --git a/devops/resources/check_primary_keys.sh b/devops/resources/check_primary_keys.sh index b516426e9..18fe05b2b 100644 --- a/devops/resources/check_primary_keys.sh +++ b/devops/resources/check_primary_keys.sh @@ -22,5 +22,8 @@ set -x if [[ ! -v RDSIGNORE ]]; then RDSIGNORE="" fi +if [[ ! -v WHITELISTREGIONS ]]; then + WHITELISTREGIONS="" +fi -python ./check_primary_keys.py --environment ${ENVIRONMENT} --deploy ${DEPLOYMENT} --region $AWS_DEFAULT_REGION --recipient $TO_ADDRESS --sender $FROM_ADDRESS ${RDSIGNORE} +python ./check_primary_keys.py --environment ${ENVIRONMENT} --deploy ${DEPLOYMENT} --region $AWS_DEFAULT_REGION --recipient $TO_ADDRESS --sender $FROM_ADDRESS ${RDSIGNORE} ${WHITELISTREGIONS}