feat: add service-action plugin trigger for link/unlink

This can be used to track in alternate systems when a service is linked/unlinked from an app by implementing the custom trigger.
This commit is contained in:
Jose Diaz-Gonzalez
2021-02-25 15:58:31 -05:00
parent 90ab3a1191
commit 9e0d948de7

View File

@@ -466,6 +466,7 @@ service_link() {
fi
[[ -n "$SERVICE_QUERYSTRING" ]] && SERVICE_URL="${SERVICE_URL}?${SERVICE_QUERYSTRING}"
config_set "$APP" "${ALIAS}_URL=$SERVICE_URL"
plugn trigger service-action link "$SERVICE" "$APP"
}
service_linked_apps() {
@@ -783,6 +784,7 @@ service_unlink() {
[[ -z ${LINK[*]} ]] && dokku_log_fail "Not linked to app $APP"
config_unset "$APP" "${LINK[*]}"
plugn trigger service-action unlink "$SERVICE" "$APP"
}
service_version() {