From f16663c1c99acf4db17ecf93335c23add7e6118e Mon Sep 17 00:00:00 2001 From: Davlet Panech Date: Thu, 24 Aug 2023 12:15:49 -0400 Subject: [PATCH] build-remote-cli: remove useless defaults Remove default image names from the script. They are hard-coded, and yet ignored -- the script always takes defaults from starlingx/clients/remote_cli/docker_image_version.sh Story: 2010226 Task: 48668 Signed-off-by: Davlet Panech Change-Id: I6c8a55e8ae77dbd7387025cf8bdbf3328ce44e31 --- build-tools/build-remote-cli.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/build-tools/build-remote-cli.sh b/build-tools/build-remote-cli.sh index 1f6bbc0b..1646e0a0 100755 --- a/build-tools/build-remote-cli.sh +++ b/build-tools/build-remote-cli.sh @@ -15,8 +15,8 @@ if [ -z "${MY_WORKSPACE}" -o -z "${MY_REPO}" ]; then exit 1 fi -PLATFORM_IMAGE="docker.io/starlingx/stx-platformclients:master-centos-stable-latest" -APPLICATION_IMAGE="docker.io/starlingx/stx-openstackclients:master-centos-stable-latest" +PLATFORM_IMAGE= +APPLICATION_IMAGE= OUTPUT_FILE="stx-remote-cli" VERSION="1.0" @@ -32,18 +32,16 @@ function usage { echo "$(basename $0) [--version ] [-o, --output ] [-t. --tag ]" echo " [--application-image ] [--platform-image ] [-h]" echo "Options:" - echo " -h show help options" + echo " -h,--help show help options" echo " --version specify remote CLI version" echo " (default value is 1.0)" echo " -o, --output specify tarball output name" echo " (default value is stx-remote-cli)" - echo " --platform-image specify platform docker image tag." - echo " (default value is docker.io/starlingx/stx-platformclients:master-centos-stable-latest)" - echo " --application-image specify application docker image." - echo " (default value is docker.io/starlingx/stx-openstackclients:master-centos-stable-latest)" + echo " --platform-image override platform docker image" + echo " --application-image override application docker image" } -OPTS=$(getopt -o h,o:,t: -l version:,output:,tag:,platform-image:,application-image: -- "$@") +OPTS=$(getopt -o h,o:,t: -l help,version:,output:,tag:,platform-image:,application-image: -- "$@") if [ $? -ne 0 ]; then usage exit 1 @@ -57,7 +55,7 @@ while true; do shift break ;; - -h) + -h|--help) usage exit 1 ;; @@ -85,8 +83,8 @@ while true; do esac done +# Clean the previous build if [ -d ${BUILD_OUTPUT_PATH} ]; then - # Clean the previous build rm -rf ${BUILD_OUTPUT_PATH} if [ $? -ne 0 ]; then echo "Failed to cleanup workspace ${BUILD_OUTPUT_PATH}" >&2