refactor: move DOKKU_WAIT_TO_RETIRE to a checks property

This centralizes the property and removes one more dokku-specific property from the app environment variables.

Closes #5049
This commit is contained in:
Jose Diaz-Gonzalez committed 2022-11-22 20:27:43 -05:00
1 parent 4749d1529e
commit f5c3b5dc34
10 files changed
+140 -14

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-checks-checks-get-property() {
declare desc="return the value for an app's checks property"
declare trigger="checks-get-property"
declare APP="$1" KEY="$2"
if [[ "$KEY" == "wait-to-retire" ]]; then
fn-checks-computed-wait-to-retire "$APP"
return
fi
return 1
}
trigger-checks-checks-get-property "$@"