Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Commit

Permalink
adds build_args_from_env option
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby authored and bonifaido committed Aug 20, 2019
1 parent b6420ca commit c687409
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ if [ -n "${PLUGIN_BUILD_ARGS:-}" ]; then
fi
if [ -n "${PLUGIN_BUILD_ARGS_FROM_ENV:-}" ]; then
BUILD_ARGS_FROM_ENV=$(echo "${PLUGIN_BUILD_ARGS_FROM_ENV}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}=${!build_arg}"; done)
BUILD_ARGS_FROM_ENV=$(echo "${PLUGIN_BUILD_ARGS_FROM_ENV}" | tr ',' '\n' | while read build_arg; do echo "--build-arg ${build_arg}=$(eval "echo \$$build_arg")"; done)
fi
echo "BUILD_ARGS_FROM_ENV"
echo ${BUILD_ARGS_FROM_ENV:-}
echo "BUILD_ARGS_FROM_ENV END"
if [ -n "${PLUGIN_TAGS:-}" ]; then
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done)
elif [ -f .tags ]; then
Expand All @@ -73,4 +69,5 @@ fi
${DESTINATIONS} \
${CACHE:-} \
${TARGET:-} \
${BUILD_ARGS:-}
${BUILD_ARGS:-} \
${BUILD_ARGS_FROM_ENV:-}

0 comments on commit c687409

Please sign in to comment.