Skip to content

Commit

Permalink
fix: feedback, deny list logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ohnickmoy committed Nov 3, 2023
1 parent a7c613d commit 2a815e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions devops/resources/janitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ cd $WORKSPACE/jenkins-job-dsl-internal
cd util/janitor
pip install -r requirements.txt

has_prospectus=0
deny_prospectus=0

for play in "${DENY_LIST}"; do
if [[ "$play" == "prospectus" ]]; then
has_prospectus=1
deny_prospectus=1
break
fi
done

if [ "$NOOP" = true ]; then
python janitor.py --noop --region $AWS_REGION --cleaner $AWS_CLEANER --log-bucket $S3_LOG_BUCKET --deny-list $DENY_LIST
elif [ "$has_prospectus" == 1 ]; then
python prospectus-janitor.py --region $AWS_REGION --cleaner $AWS_CLEANER --log-bucket $S3_LOG_BUCKET
else
elif [ "$deny_prospectus" == 1 ]; then
python janitor.py --region $AWS_REGION --cleaner $AWS_CLEANER --log-bucket $S3_LOG_BUCKET --deny-list $DENY_LIST
else
python prospectus-janitor.py --region $AWS_REGION --cleaner $AWS_CLEANER --log-bucket $S3_LOG_BUCKET
fi

curl -X GET 'https://api.opsgenie.com/v2/heartbeats/'${JOB_NAME##*/}'/ping' -H 'Authorization: GenieKey '${GENIE_KEY}

0 comments on commit 2a815e2

Please sign in to comment.