Add option to source env from file
This commit is contained in:
parent
8aa00208d3
commit
d6a335c91e
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,14 @@ set -eu;
|
|||
## check input
|
||||
##
|
||||
|
||||
if [[ -n "${PLUGIN_ENV_FILE:-}" ]]; then
|
||||
if [[ ! -f "PLUGIN_ENV_FILE" ]]; then
|
||||
echo "Env file $PLUGIN_ENV_FILE not found."
|
||||
exit 1
|
||||
fi
|
||||
source "$PLUGIN_ENV_FILE"
|
||||
fi
|
||||
|
||||
BUILDCTL_CONTEXT=${PLUGIN_CONTEXT:-$(pwd)}
|
||||
BUILDCTL_DOCKERFILE=$(dirname "${PLUGIN_DOCKERFILE:-$BUILDCTL_CONTEXT/Dockerfile}")
|
||||
if [[ ! -f $BUILDCTL_DOCKERFILE/Dockerfile ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue