From ab02c609a63081e59d15dd9331c4f77074942d5f Mon Sep 17 00:00:00 2001 From: Michiel Meeuwissen Date: Sat, 16 Nov 2024 22:12:12 +0100 Subject: [PATCH] Moving stuff around. --- scripts/helm-functions.sh | 19 ++++++++++++++++--- scripts/script.sh | 12 +----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/scripts/helm-functions.sh b/scripts/helm-functions.sh index 3c5e2d0..d0509fe 100644 --- a/scripts/helm-functions.sh +++ b/scripts/helm-functions.sh @@ -1,4 +1,17 @@ #!/bin/bash +CHART_PROJECT_NAME=${CHART_PROJECT_NAME:-openshift-chart-deployment} +CHART_VERSION=${CHART_VERSION:-3.2} +TRACE=${TRACE:-false} + +OS_PROJECT=${OS_PROJECT:-poms} +OS_ENV=${OS_ENV:-test} + +HELM_REPO=${HELM_REPO:-oci://registry.npohosting.nl/poms} +HELM_REGISTRY=${HELM_REGISTRY:-https://registry.npohosting.nl} + +OC_CONTEXT_PROD=${OC_CONTEXT_PROD:=pomsp} +OC_CONTEXT_TEST=${OC_CONTEXT_TEST:=pomst} + echo "helm build setup" if ! type os_app_name &> /dev/null ; then . "$KANIKO_SCRIPTS"dockerfile-functions.sh @@ -11,10 +24,10 @@ login_oc() { export SERVER if [ "$OS_ENV" = "prod" ]; then SERVER=$OPENSHIFT_PROD_SERVER - CONTEXT=pomsp + CONTEXT=$OC_CONTEXT_PROD else SERVER=$OPENSHIFT_TEST_SERVER - CONTEXT=pomst + CONTEXT=$OC_CONTEXT_TEST fi if [ "$KUBECONFIG" != "" ]; then @@ -33,7 +46,7 @@ login_oc() { oc projects } -echo "${BASH_VERSION} $LINENO Defining setup_oc_helm function" +echo "Defining setup_oc_helm function" function setup_oc_helm() { DIR=$1 diff --git a/scripts/script.sh b/scripts/script.sh index c77fed6..85db3e5 100644 --- a/scripts/script.sh +++ b/scripts/script.sh @@ -1,17 +1,7 @@ #!/bin/bash -export CHART_PROJECT_NAME=openshift-chart-deployment -export CHART_VERSION=3.2 -export TRACE=false -export OS_PROJECT=poms -export OS_ENV=test -export HELM_REPO=oci://registry.npohosting.nl/poms -export HELM_REGISTRY=https://registry.npohosting.nl - -export HARBOR_USER -export HARBOR_PASSWORD -. /conf/harbor.properties +#. /conf/harbor.properties cd /workspace || exit 1