diff --git a/devops/jobs/ProspectusJanitor.groovy b/devops/jobs/ProspectusJanitor.groovy index 72f9b9b43..fbca7a5e2 100644 --- a/devops/jobs/ProspectusJanitor.groovy +++ b/devops/jobs/ProspectusJanitor.groovy @@ -32,7 +32,7 @@ class ProspectusJanitor { assert extraVars.containsKey('DEPLOYMENTS') : "Please define DEPLOYMENTS. It should be a list of strings." assert !(extraVars.get('DEPLOYMENTS') instanceof String) : "Make sure DEPLOYMENTS is a list and not a string" extraVars.get('DEPLOYMENTS').each { deployment, configuration -> - dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/janitor-${deployment}") { + dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/prospectus-janitor-${deployment}") { logRotator common_logrotator wrappers common_wrappers diff --git a/devops/resources/janitor.sh b/devops/resources/janitor.sh index 08018d117..b84caa927 100644 --- a/devops/resources/janitor.sh +++ b/devops/resources/janitor.sh @@ -25,12 +25,14 @@ pip install -r requirements.txt deny_prospectus=0 -for play in "${DENY_LIST}"; do - if [[ "$play" == "prospectus" ]]; then - deny_prospectus=1 - break - fi -done +if [ -v DENY_LIST ]; then + for play in "${DENY_LIST}"; do + if [[ "$play" == "prospectus" ]]; then + deny_prospectus=1 + break + fi + done +fi if [ "$NOOP" = true ]; then python janitor.py --noop --region $AWS_REGION --cleaner $AWS_CLEANER --log-bucket $S3_LOG_BUCKET --deny-list $DENY_LIST