Skip to content

Commit

Permalink
Merge pull request #1699 from edx/nmoy/ISRE-1995_jenkins_job_fix
Browse files Browse the repository at this point in the history
fix: undo job override of janitor, fix shell script
  • Loading branch information
ohnickmoy authored Nov 6, 2023
2 parents 697c9fe + 36ebb61 commit 1d83247
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion devops/jobs/ProspectusJanitor.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 8 additions & 6 deletions devops/resources/janitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d83247

Please sign in to comment.