+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No app name found for flag: '--use-local-image'"
+ fi
+ else
+ echo "Option set - Overriding with local images for app(s):"$USE_LOCAL_IMAGES
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--use-snapshot-image" ]; then
+ USE_SNAPSHOT_IMAGES=""
+ shift
+ while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+ USE_SNAPSHOT_IMAGES=$USE_SNAPSHOT_IMAGES" "$1
+ if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="App name $1 is not available for snapshot override for flag: '--use-snapshot-image'"
+ fi
+ fi
+ shift;
+ done
+ foundparm=0
+ if [ -z "$USE_SNAPSHOT_IMAGES" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No app name found for flag: '--use-snapshot-image'"
+ fi
+ else
+ echo "Option set - Overriding with snapshot images for app(s):"$USE_SNAPSHOT_IMAGES
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--use-staging-image" ]; then
+ USE_STAGING_IMAGES=""
+ shift
+ while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+ USE_STAGING_IMAGES=$USE_STAGING_IMAGES" "$1
+ if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="App name $1 is not available for staging override for flag: '--use-staging-image'"
+ fi
+ fi
+ shift;
+ done
+ foundparm=0
+ if [ -z "$USE_STAGING_IMAGES" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No app name found for flag: '--use-staging-image'"
+ fi
+ else
+ echo "Option set - Overriding with staging images for app(s):"$USE_STAGING_IMAGES
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--use-release-image" ]; then
+ USE_RELEASE_IMAGES=""
+ shift
+ while [ $# -gt 0 ] && [[ "$1" != "--"* ]]; do
+ USE_RELEASE_IMAGES=$USE_RELEASE_IMAGES" "$1
+ if [[ "$AVAILABLE_IMAGES_OVERRIDE" != *"$1"* ]]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="App name $1 is not available for release override for flag: '--use-release-image'"
+ fi
+ fi
+ shift;
+ done
+ foundparm=0
+ if [ -z "$USE_RELEASE_IMAGES" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No app name found for flag: '--use-release-image'"
+ fi
+ else
+ echo "Option set - Overriding with release images for app(s):"$USE_RELEASE_IMAGES
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--image-repo" ]; then
+ shift;
+ IMAGE_REPO_ADR=$1
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No image repo url found for : '--image-repo'"
+ fi
+ else
+ echo "Option set - Image repo url: "$1
+ shift;
+ foundparm=0
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--repo-policy" ]; then
+ shift;
+ IMAGE_REPO_POLICY=$1
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No policy found for : '--repo-policy'"
+ fi
+ else
+ if [ "$1" == "local" ] || [ "$1" == "remote" ]; then
+ echo "Option set - Image repo policy: "$1
+ shift;
+ foundparm=0
+ else
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="Repo policy shall be 'local' or 'remote'"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--cluster-timeout" ]; then
+ shift;
+ CLUSTER_TIME_OUT=$1
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No timeout value found for : '--cluster-timeout'"
+ fi