Browse Source

new: new hook ``post_deploy``.

raw-remaining-args
Valentin Lab 9 years ago
parent
commit
9ef232e9b8
  1. 9
      bin/compose

9
bin/compose

@ -1091,7 +1091,8 @@ run_service_hook () {
Wrap -d "$YELLOW$action$NORMAL hook of charm $DARKYELLOW$charm$NORMAL" <<EOF || return 1 Wrap -d "$YELLOW$action$NORMAL hook of charm $DARKYELLOW$charm$NORMAL" <<EOF || return 1
export SERVICE_NAME=$subservice export SERVICE_NAME=$subservice
export IMAGE_NAME=$(echo "${PROJECT_NAME}" | tr -d "_-")_\${SERVICE_NAME}
export MASTER_BASE_CHARM_NAME=$(get_top_master_charm_for_service "$subservice") || return 1
export IMAGE_NAME=$(echo "${PROJECT_NAME}" | tr -d "_-")_\${MASTER_BASE_CHARM_NAME}
export CONTAINER_NAME=\${IMAGE_NAME}_1 export CONTAINER_NAME=\${IMAGE_NAME}_1
export CHARM_NAME="$charm" export CHARM_NAME="$charm"
export PROJECT_NAME=$PROJECT_NAME export PROJECT_NAME=$PROJECT_NAME
@ -2449,6 +2450,7 @@ full_init=
case "$action" in case "$action" in
up|run) up|run)
full_init=true full_init=true
post_hook=true
;; ;;
"") "")
full_init= full_init=
@ -2516,3 +2518,8 @@ case "$action" in
fi fi
;; ;;
esac esac
if [ "$post_hook" ]; then
run_service_hook "$services" post_deploy || exit 1
fi
Loading…
Cancel
Save