diff --git a/src/scripts/get-prev-task.sh b/src/scripts/get-prev-task.sh index f9b34772..a8ba99cd 100644 --- a/src/scripts/get-prev-task.sh +++ b/src/scripts/get-prev-task.sh @@ -30,12 +30,10 @@ cat <<< "$ECS_SCRIPT_UPDATE_CONTAINER_DEFS" > "$UPDATE_CONTAINER_DEFS_SCRIPT_FIL # Prepare container definitions CONTAINER_DEFS=$(python "$UPDATE_CONTAINER_DEFS_SCRIPT_FILE" "$PREVIOUS_TASK_DEFINITION" "$ECS_PARAM_CONTAINER_IMAGE_NAME_UPDATES" "$ECS_PARAM_CONTAINER_ENV_VAR_UPDATES") - # Escape single quotes from environment variables for BASH_ENV CLEANED_CONTAINER_DEFS=$(echo "$CONTAINER_DEFS" | sed -E "s:':'\\\'':g") - # Prepare script for getting task definition values GET_TASK_DFN_VAL_SCRIPT_FILE=$(mktemp _get_task_def_value.py.XXXXXX) diff --git a/src/scripts/update_container_defs.py b/src/scripts/update_container_defs.py index 683e3855..a4db9566 100644 --- a/src/scripts/update_container_defs.py +++ b/src/scripts/update_container_defs.py @@ -34,7 +34,7 @@ def run(previous_task_definition, container_image_name_updates, container_name = kv[1].strip() env_var_name_kv = env_kv_pairs[index+1].split('=') env_var_name = env_var_name_kv[1].strip() - env_var_value_kv = env_kv_pairs[index+2].split('=') + env_var_value_kv = env_kv_pairs[index+2].split('=', maxsplit=1) env_var_value = env_var_value_kv[1].strip() if env_var_name_kv[0].strip() != 'name' or env_var_value_kv[0].strip() != 'value': raise ValueError(