Browse Source

Merge "tools: generalize execute_shipyard_action"

changes/73/633873/35
Zuul 2 years ago
committed by Gerrit Code Review
parent
commit
041cbcbafe
2 changed files with 3 additions and 13 deletions
  1. +2
    -12
      tools/execute_shipyard_action.sh
  2. +1
    -1
      tools/redeploy_server.sh

+ 2
- 12
tools/execute_shipyard_action.sh View File

@ -32,7 +32,7 @@ run_action () {
# Define Variables
action=$1
servers=$2
action_args="${@:2}"
# Define Color
NC='\033[0m'
@ -47,17 +47,7 @@ run_action () {
# Execute action
echo -e "Execute ${action} Dag...\n"
# Note that deploy and update site do not require additional parameter
# to be passed in while redeploy_server requires user to indicate which
# servers to redeploy
if ! [[ ${servers} ]] && [[ ${action} ]]; then
${base_docker_command} ${SHIPYARD_IMAGE} create action ${action}
elif [[ ${action} == 'redeploy_server' && ${servers} ]]; then
${base_docker_command} ${SHIPYARD_IMAGE} create action redeploy_server --param="target_nodes=${servers}"
else
echo "Invalid Input!"
exit 1
fi
${base_docker_command} ${SHIPYARD_IMAGE} create action ${action} ${action_args}
# The status or lifecycle phase of an action can be
#


+ 1
- 1
tools/redeploy_server.sh View File

@ -34,4 +34,4 @@ servers=$1
source set_env
# Execute shipyard action for redeploy_server
bash execute_shipyard_action.sh 'redeploy_server' ${servers}
bash execute_shipyard_action.sh 'redeploy_server' --param="target_nodes=${servers}"

Loading…
Cancel
Save