allow option to specify a different dockerfile in prepare-for-integration-tests
Signed-off-by: Margo Crawford <margaretc@vmware.com>
This commit is contained in:
parent
1ee0aed054
commit
901f9fba02
@ -49,6 +49,7 @@ help=no
|
|||||||
skip_build=no
|
skip_build=no
|
||||||
clean_kind=no
|
clean_kind=no
|
||||||
api_group_suffix="pinniped.dev" # same default as in the values.yaml ytt file
|
api_group_suffix="pinniped.dev" # same default as in the values.yaml ytt file
|
||||||
|
dockerfile_path=""
|
||||||
skip_chromedriver_check=no
|
skip_chromedriver_check=no
|
||||||
get_active_directory_vars="" # specify a filename for a script to get AD related env variables
|
get_active_directory_vars="" # specify a filename for a script to get AD related env variables
|
||||||
alternate_deploy="undefined"
|
alternate_deploy="undefined"
|
||||||
@ -91,6 +92,16 @@ while (("$#")); do
|
|||||||
get_active_directory_vars=$1
|
get_active_directory_vars=$1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--dockerfile-path)
|
||||||
|
shift
|
||||||
|
# If there are no more command line arguments, or there is another command line argument but it starts with a dash, then error
|
||||||
|
if [[ "$#" == "0" || "$1" == -* ]]; then
|
||||||
|
log_error "--dockerfile-path requires a script name to be specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dockerfile_path=$1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--alternate-deploy)
|
--alternate-deploy)
|
||||||
shift
|
shift
|
||||||
if [[ "$#" == "0" || "$1" == -* ]]; then
|
if [[ "$#" == "0" || "$1" == -* ]]; then
|
||||||
@ -219,9 +230,14 @@ registry_repo_tag="${registry_repo}:${tag}"
|
|||||||
|
|
||||||
if [[ "$do_build" == "yes" ]]; then
|
if [[ "$do_build" == "yes" ]]; then
|
||||||
# Rebuild the code
|
# Rebuild the code
|
||||||
|
if [[ "$dockerfile_path" != "" ]]; then
|
||||||
|
log_note "Docker building the app with dockerfile $dockerfile_path..."
|
||||||
|
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag" --file "$dockerfile_path"
|
||||||
|
else
|
||||||
log_note "Docker building the app..."
|
log_note "Docker building the app..."
|
||||||
# DOCKER_BUILDKIT=1 is optional on MacOS but required on linux.
|
# DOCKER_BUILDKIT=1 is optional on MacOS but required on linux.
|
||||||
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag"
|
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load it into the cluster
|
# Load it into the cluster
|
||||||
|
Loading…
x
Reference in New Issue
Block a user