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

Support expanding env vars on the extra_build_args parameter #149

Merged
merged 3 commits into from
Sep 2, 2022
Merged
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
9 changes: 5 additions & 4 deletions src/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DOCKER_TAGS_ARG=""

parse_tags_to_docker_arg() {
# Set comma as the new delimiter for the scope of this function.
local IFS=","
local IFS=","

# Split tags into an array based on IFS delimiter.
read -ra tags <<< "$PARAM_TAG"
Expand Down Expand Up @@ -47,12 +47,13 @@ if [ -n "$PARAM_CACHE_FROM" ]; then
fi

build_args=(
"--file=$PARAM_DOCKERFILE_PATH/$PARAM_DOCKERFILE_NAME"
"$DOCKER_TAGS_ARG"
"--file=$PARAM_DOCKERFILE_PATH/$PARAM_DOCKERFILE_NAME"
"$DOCKER_TAGS_ARG"
)

if [ -n "$PARAM_EXTRA_BUILD_ARGS" ]; then
build_args+=("$PARAM_EXTRA_BUILD_ARGS")
extra_build_args="$(eval echo "$PARAM_EXTRA_BUILD_ARGS")"
build_args+=("$extra_build_args")
fi

if [ -n "$PARAM_CACHE_FROM" ]; then
Expand Down