adds build_args_from_env option

This commit is contained in:
Kristoffer Dalby 2019-08-20 13:46:53 +01:00 committed by Nándor István Krácser
parent b6420cac1c
commit c687409a35

View File

@ -47,13 +47,9 @@ if [ -n "${PLUGIN_BUILD_ARGS:-}" ]; then
fi fi
if [ -n "${PLUGIN_BUILD_ARGS_FROM_ENV:-}" ]; then 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 fi
echo "BUILD_ARGS_FROM_ENV"
echo ${BUILD_ARGS_FROM_ENV:-}
echo "BUILD_ARGS_FROM_ENV END"
if [ -n "${PLUGIN_TAGS:-}" ]; then if [ -n "${PLUGIN_TAGS:-}" ]; then
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done) DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done)
elif [ -f .tags ]; then elif [ -f .tags ]; then
@ -73,4 +69,5 @@ fi
${DESTINATIONS} \ ${DESTINATIONS} \
${CACHE:-} \ ${CACHE:-} \
${TARGET:-} \ ${TARGET:-} \
${BUILD_ARGS:-} ${BUILD_ARGS:-} \
${BUILD_ARGS_FROM_ENV:-}