Browse Source

new: [compose-core] added ``--no-post-deploy`` and prevented also ``post-deploy`` from running when using ``--no-hooks``

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation 1.5.3
Valentin Lab 4 years ago
parent
commit
b9dd681f88
  1. 8
      bin/compose-core

8
bin/compose-core

@ -3604,8 +3604,9 @@ display_help() {
echo " --dry-compose-run If docker-compose will be run, only print out what"
echo " command line will be used."
echo " --no-relations Do not run any relation script"
echo " --no-hooks Do not run any init script"
echo " --no-hooks Do not run any hook script"
echo " --no-init Do not run any init script"
echo " --no-post-deploy Do not run any post-deploy script"
echo " --without-relation RELATION "
echo " Do not run given relation"
echo " -R, --rebuild-relations-to-service SERVICE"
@ -3897,6 +3898,9 @@ while read-0 arg; do
--no-init)
export no_init=true
;;
--no-post-deploy)
export no_post_deploy=true
;;
--rebuild-relations-to-service|-R)
read-0 value
rebuild_relations_to_service+=("$value")
@ -4230,7 +4234,7 @@ case "$action" in
esac || exit 1
if [ "$post_hook" -a "${#services_args[@]}" != 0 ]; then
if [ "$post_hook" -a "${#services_args[@]}" != 0 -a -z "$no_hooks" -a -z "$no_post_deploy" ]; then
run_service_hook post_deploy "${services_args[@]}" || exit 1
fi

Loading…
Cancel
Save