Skip to content

Commit

Permalink
[patch] Fix up dev-mode support (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
durera authored May 26, 2023
1 parent e1f4c31 commit c0ae027
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
29 changes: 24 additions & 5 deletions image/cli/mascli/functions/install
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Advanced Db2u Universal Operator Configuration (Optional):
--db2u-temp-storage ${COLOR_YELLOW}DB2_TEMP_STORAGE_SIZE${TEXT_RESET} Customise Db2 storage capacity
Other Commands:
--dev-mode Enable developer mode (e.g. for access to pre-release builds)
--no-wait-for-pvcs If you are using using storage classes that utilize 'WaitForFirstConsumer' binding mode use this flag
--no-confirm Mirror images without prompting for confirmation
-h, --help Show this help message
Expand All @@ -78,12 +79,9 @@ EOM

function install_noninteractive() {
NON_INTERACTIVE=true
# Defaults
MAS_ICR_CP=cp.icr.io/cp
MAS_ICR_CPOPEN=icr.io/cpopen
SLS_ICR_CP=cp.icr.io/cp
SLS_ICR_CPOPEN=icr.io/cpopen
DEV_MODE=false

# Defaults
DB2_ACTION_SYSTEM=none
DB2_ACTION_MANAGE=none

Expand Down Expand Up @@ -226,6 +224,11 @@ function install_noninteractive() {
;;
--license-file)
export SLS_LICENSE_FILE_LOCAL=$1 && shift
if [[ ! -e "$SLS_LICENSE_FILE_LOCAL" ]]; then
echo_warning "Error: File does not exist: $SLS_LICENSE_FILE_LOCAL"
exit 1
fi
export SLS_LICENSE_FILE="/workspace/entitlement/$(basename $SLS_LICENSE_FILE_LOCAL)"
;;
--uds-email)
export UDS_CONTACT_EMAIL=$1 && shift
Expand All @@ -238,6 +241,9 @@ function install_noninteractive() {
;;

# Other Commands
--dev-mode)
DEV_MODE=true
;;
--no-wait-for-pvcs)
WAIT_FOR_PVCS=false
;;
Expand All @@ -258,6 +264,19 @@ function install_noninteractive() {
esac
done

if [[ "$DEV_MODE" == "true" ]]; then
MAS_ICR_CP=docker-na-public.artifactory.swg-devops.com/wiotp-docker-local
MAS_ICR_CPOPEN=docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen
SLS_ICR_CP=docker-na-public.artifactory.swg-devops.com/wiotp-docker-local
SLS_ICR_CPOPEN=docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen
else
MAS_ICR_CP=cp.icr.io/cp
MAS_ICR_CPOPEN=icr.io/cpopen
SLS_ICR_CP=cp.icr.io/cp
SLS_ICR_CPOPEN=icr.io/cpopen
fi


}

function install_interactive() {
Expand Down
4 changes: 4 additions & 0 deletions image/cli/mascli/functions/pipeline_show_config
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ function pipeline_show_config() {
echo_reset_dim "IBM Entitled Registry ..... ${COLOR_MAGENTA}${MAS_ICR_CP}"
echo_reset_dim "IBM Open Registry ......... ${COLOR_MAGENTA}${MAS_ICR_CPOPEN}"
echo_reset_dim "IBM Entitlement Key ....... ${COLOR_MAGENTA}${IBM_ENTITLEMENT_KEY:0:8}<snip>"
if [[ "${DEV_MODE}" == "true" ]]; then
echo_reset_dim "Artifactory Username ...... ${COLOR_MAGENTA}${ARTIFACTORY_USERNAME}<snip>"
echo_reset_dim "Artifactory Token ......... ${COLOR_MAGENTA}${ARTIFACTORY_TOKEN:0:8}<snip>"
fi

reset_colors
echo "${TEXT_DIM}"
Expand Down

0 comments on commit c0ae027

Please sign in to comment.