Skip to content

Commit

Permalink
Merge pull request #1712 from edx/ihassan/GSRE-997_update_check_prima…
Browse files Browse the repository at this point in the history
…ry_job

chore: Update check primray key job to run for whitelisted regions
  • Loading branch information
syedimranhassan authored Dec 12, 2023
2 parents 6f0a9e6 + cb511d2 commit 245c19e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion devops/jobs/CheckPrimaryKeys.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion devops/resources/check_primary_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 245c19e

Please sign in to comment.