Skip to content

Commit

Permalink
updating userdb job to work with new al images (#2665)
Browse files Browse the repository at this point in the history
  • Loading branch information
EliseCastle23 authored Nov 8, 2024
1 parent 75b4a52 commit 3217905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kube/services/jobs/indexd-userdb-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
# Script always succeeds if it runs (echo exits with 0)
# indexd image does not include jq, so use python
- |
eval $(python 2> /dev/null <<EOM
eval $( (python 2> /dev/null || poetry run python 2> /dev/null) <<EOM
import json
sheepdog_data = json.load(open('/var/www/indexd/sheepdog_creds.json', 'r'))
Expand All @@ -90,7 +90,7 @@ spec:
EOM
)
for user in "${!user_db[@]}"; do
python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}"
(python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}" 2> /dev/null || poetry run python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}")
done
echo "Exit code: $?"
restartPolicy: Never

0 comments on commit 3217905

Please sign in to comment.