add readiness-hook check_blueprints
This commit is contained in:
@@ -386,6 +386,22 @@ Brand.objects.filter(default=True).delete()
|
||||
apply_blueprints
|
||||
}
|
||||
|
||||
check_blueprints() {
|
||||
failed_blueprints=$(/manage.py shell -c """
|
||||
print(','.join(b.path for b in BlueprintInstance.objects.exclude(status='successful')))
|
||||
""" 2>&1 | quieten | tail -n1)
|
||||
|
||||
if [ -z "$failed_blueprints" ]; then
|
||||
echo "All Blueprints Successful"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "These Blueprints failed:"
|
||||
echo "$failed_blueprints" | tr ',' '\n'
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
get_certificate() {
|
||||
/manage.py shell -c """
|
||||
provider_name='$1'
|
||||
|
||||
Reference in New Issue
Block a user