Skip to content

Commit

Permalink
Fix the issue of ignoring the provided context value
Browse files Browse the repository at this point in the history
Signed-off-by: savitaashture <[email protected]>
  • Loading branch information
savitaashture authored and vdemeester committed Jan 2, 2025
1 parent 9aa6d5a commit 2cfb27a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/buildah-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ declare -rx RESULTS_IMAGE_URL_PATH="${RESULTS_IMAGE_URL_PATH:-}"

# exposing the full path to the container file, which by default should be relative to the primary
# workspace, to receive a different container-file location
declare -r dockerfile_on_ws="${WORKSPACES_SOURCE_PATH}/${PARAMS_DOCKERFILE}"
declare -x DOCKERFILE_FULL="${DOCKERFILE_FULL:-${dockerfile_on_ws}}"

# Addresses the issue of ignoring context values when they are provided where `.` is a default value
if [ -n "$PARAMS_CONTEXT" ] && [ "$PARAMS_CONTEXT" != "." ]; then
declare -r dockerfile_on_ws="${WORKSPACES_SOURCE_PATH}/${PARAMS_CONTEXT}/${PARAMS_DOCKERFILE}"
else
declare -r dockerfile_on_ws="${WORKSPACES_SOURCE_PATH}/${PARAMS_DOCKERFILE}"
fi
declare -x DOCKERFILE_FULL="${DOCKERFILE_FULL:-${dockerfile_on_ws}}"
#
# Asserting Environment
#
Expand Down

0 comments on commit 2cfb27a

Please sign in to comment.