Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98edfb9bb2 | ||
|
|
c32f4e92a1 | ||
|
|
1542a9556f | ||
|
|
4948e2b91d | ||
|
|
621e018999 |
@@ -283,6 +283,7 @@ service_container_rm() {
|
|||||||
[[ -z "$ID" ]] && return 0
|
[[ -z "$ID" ]] && return 0
|
||||||
|
|
||||||
dokku_log_verbose_quiet "Removing container"
|
dokku_log_verbose_quiet "Removing container"
|
||||||
|
docker update --restart=no "$SERVICE_NAME" > /dev/null 2>&1
|
||||||
if ! docker rm "$SERVICE_NAME" > /dev/null 2>&1; then
|
if ! docker rm "$SERVICE_NAME" > /dev/null 2>&1; then
|
||||||
dokku_log_fail "Unable to remove container for service $SERVICE"
|
dokku_log_fail "Unable to remove container for service $SERVICE"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ fn-help-contents-subcommand() {
|
|||||||
fn-help-fancy-tput() {
|
fn-help-fancy-tput() {
|
||||||
declare desc="A wrapper around tput"
|
declare desc="A wrapper around tput"
|
||||||
|
|
||||||
if [[ -z "$DOKKU_NO_COLOR" ]] || [[ "$TERM" = "unknown" ]] || [[ "$TERM" == "dumb" ]]; then
|
if [[ -n "$DOKKU_NO_COLOR" ]] || [[ "$TERM" = "unknown" ]] || [[ "$TERM" == "dumb" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ fn-help-fancy-tput() {
|
|||||||
fn-help-fancy-color() {
|
fn-help-fancy-color() {
|
||||||
declare desc="A wrapper around colors"
|
declare desc="A wrapper around colors"
|
||||||
|
|
||||||
if [[ -z "$DOKKU_NO_COLOR" ]] || [[ "$TERM" = "unknown" ]] || [[ "$TERM" == "dumb" ]]; then
|
if [[ -n "$DOKKU_NO_COLOR" ]] || [[ "$TERM" = "unknown" ]] || [[ "$TERM" == "dumb" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku postgres service plugin"
|
description = "dokku postgres service plugin"
|
||||||
version = "1.4.9"
|
version = "1.4.11"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ service-upgrade-cmd() {
|
|||||||
verify_service_name "$SERVICE"
|
verify_service_name "$SERVICE"
|
||||||
|
|
||||||
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
|
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
|
||||||
local ID="$(cat "$SERVICE_ROOT/ID")"
|
|
||||||
is_container_status "$ID" "Running" || dokku_log_fail "Service ${SERVICE} container is not running"
|
|
||||||
|
|
||||||
service_parse_args "${@:2}"
|
service_parse_args "${@:2}"
|
||||||
|
|
||||||
@@ -30,10 +28,17 @@ service-upgrade-cmd() {
|
|||||||
dokku_log_fail "Unable to proceed with upgrade, image ${PLUGIN_IMAGE}:${PLUGIN_IMAGE_VERSION} does not exist"
|
dokku_log_fail "Unable to proceed with upgrade, image ${PLUGIN_IMAGE}:${PLUGIN_IMAGE_VERSION} does not exist"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dokku_log_info2 "Upgrading $SERVICE to $PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION"
|
local NEW_PLUGIN_IMAGE_TAG="$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION"
|
||||||
|
if [[ "$(service_version "$SERVICE")" == "$NEW_PLUGIN_IMAGE_TAG" ]]; then
|
||||||
|
dokku_log_info1 "Service $SERVICE already running $NEW_PLUGIN_IMAGE_TAG"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
dokku_log_info2 "Upgrading $SERVICE to $NEW_PLUGIN_IMAGE_TAG"
|
||||||
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
|
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
|
||||||
dokku_log_info2 "Stopping all linked services"
|
dokku_log_info2 "Stopping all linked services"
|
||||||
for app in $(service_linked_apps "$SERVICE"); do
|
for app in $(service_linked_apps "$SERVICE"); do
|
||||||
|
[[ "$app" == "-" ]] && continue
|
||||||
ps_stop "$app"
|
ps_stop "$app"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -45,6 +50,7 @@ service-upgrade-cmd() {
|
|||||||
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
|
if [[ "$SERVICE_RESTART_APPS" == "true" ]]; then
|
||||||
dokku_log_info2 "Starting all linked services"
|
dokku_log_info2 "Starting all linked services"
|
||||||
for app in $(service_linked_apps "$SERVICE"); do
|
for app in $(service_linked_apps "$SERVICE"); do
|
||||||
|
[[ "$app" == "-" ]] && continue
|
||||||
ps_start "$app"
|
ps_start "$app"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
1
tests/test_helper.bash
Normal file → Executable file
1
tests/test_helper.bash
Normal file → Executable file
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
export DOKKU_QUIET_OUTPUT=1
|
|
||||||
export DOKKU_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku"
|
export DOKKU_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku"
|
||||||
export DOKKU_VERSION=${DOKKU_VERSION:-"master"}
|
export DOKKU_VERSION=${DOKKU_VERSION:-"master"}
|
||||||
export PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin:$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku:$PATH"
|
export PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/bin:$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/dokku:$PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user