Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added maxsplit=1 to split method to handle base64 values #170

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/scripts/get-prev-task.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/update_container_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down