Skip to content

Commit

Permalink
chore: Update check slow logs job to run for whitelisted regions
Browse files Browse the repository at this point in the history
  • Loading branch information
syedimranhassan committed Dec 12, 2023
1 parent 4ad2e30 commit 540636e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions devops/jobs/ExportRDSSlowQueryLogs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ class ExportRDSSlowQueryLogs {
rdsignore = "${rdsignore}-i ${ignore} "
}

def whitelistregions = ""
configuration.REGION_LIST.each { include ->
whitelistregions = "${whitelistregions}-r ${include} "
}

environmentVariables {
env('AWS_DEFAULT_REGION', extraVars.get('REGION'))
env('ENVIRONMENT', environment)
env('RDSIGNORE', rdsignore)
env('WHITELISTREGIONS', whitelistregions)
}

multiscm {
Expand Down
5 changes: 4 additions & 1 deletion devops/resources/export-slow-query-logs.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 export_slow_query_logs.py --environment ${ENVIRONMENT} ${RDSIGNORE}
python export_slow_query_logs.py --environment ${ENVIRONMENT} ${RDSIGNORE} ${WHITELISTREGIONS}

0 comments on commit 540636e

Please sign in to comment.