diff --git a/scripts/bitops-config/converters/boolean.sh b/scripts/bitops-config/converters/boolean.sh index 71d5357..c3e9e73 100755 --- a/scripts/bitops-config/converters/boolean.sh +++ b/scripts/bitops-config/converters/boolean.sh @@ -14,7 +14,7 @@ if [ -n "$DEEP_DEBUG" ]; then fi OUTPUT="" -if [ -z "$value" ] || [ "$value" == "" ] || [ "$value" == "False" ]; then +if [ -z "$value" ] || [ "$value" == "" ] || [ "$value" == "False" ] || [ "$value" == "false" ]; then OUTPUT="" elif [ "$value" == "True" ]; then OUTPUT="${cli_flag}" diff --git a/scripts/helm_handle_chart.sh b/scripts/helm_handle_chart.sh old mode 100644 new mode 100755 index d624092..e884136 --- a/scripts/helm_handle_chart.sh +++ b/scripts/helm_handle_chart.sh @@ -40,9 +40,9 @@ bash $SCRIPTS_DIR/before-deploy.sh "$HELM_CHART_DIRECTORY" # set kube config if [[ -z "$KUBECONFIG_BASE64" ]]; then - if [[ "${KUBE_CONFIG_PATH}" == "" ]] || [[ "${KUBE_CONFIG_PATH}" == "''" ]] || [[ "${KUBE_CONFIG_PATH}" == "None" ]]; then - if [[ "${FETCH_KUBECONFIG}" == "True" ]]; then - if [[ "${CLUSTER_NAME}" == "" ]] || [[ "${CLUSTER_NAME}" == "''" ]] || [[ "${CLUSTER_NAME}" == "None" ]]; then + if [[ "${KUBE_CONFIG_PATH}" == "" ]] || [[ "${KUBE_CONFIG_PATH}" == "''" ]] || [[ "${KUBE_CONFIG_PATH}" == "None" ]] || [[ "${KUBE_CONFIG_PATH}" == "none" ]]; then + if [[ "${FETCH_KUBECONFIG}" == "true" ]]; then + if [[ "${CLUSTER_NAME}" == "" ]] || [[ "${CLUSTER_NAME}" == "''" ]] || [[ "${CLUSTER_NAME}" == "None" ]] || [[ "${CLUSTER_NAME}" == "none" ]]; then >&2 echo "{\"error\":\"CLUSTER_NAME config is required.Exiting...\"}" exit 1 else @@ -56,7 +56,7 @@ if [[ -z "$KUBECONFIG_BASE64" ]]; then export h="helm --kubeconfig=$BITOPS_KUBE_CONFIG_FILE" fi else - if [[ "${FETCH_KUBECONFIG}" == "False" ]]; then + if [[ "${FETCH_KUBECONFIG}" == "false" ]]; then >&2 echo "{\"error\":\"'kubeconfig' cannot be false when 'cluster-name' variable is defined in bitops.config.yaml.Exiting...\"}" exit 1 fi @@ -105,7 +105,7 @@ if [ -z $BITOPS_PLUGIN_NAME ]; then fi echo "Identify the default root folder for $HELM_CHART helm chart" -if [[ "${DEFAULT_DIR_FLAG}" == "True" ]]; then +if [[ "${DEFAULT_DIR_FLAG}" == "true" ]]; then echo "Use 'opsrepo_root_default_dir' of bitops.config.yaml build config value for default root directory..." export DEFAULT_HELM_ROOT="$BITOPS_TEMPDIR/$BITOPS_DEFAULT_ROOT_DIR/$BITOPS_PLUGIN_NAME" else