From 26c1bcfb1eec2962a663876ea5be6998165737e7 Mon Sep 17 00:00:00 2001 From: Michiel Meeuwissen Date: Sat, 16 Nov 2024 23:27:53 +0100 Subject: [PATCH] Cleaning --- helm.sh | 14 ++++++++++++-- scripts/helm-functions.sh | 14 +++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/helm.sh b/helm.sh index 175f638..4d67423 100755 --- a/helm.sh +++ b/helm.sh @@ -3,5 +3,15 @@ HELM_IMAGE=vpro/openshift-helm:main -docker run -v ~/conf:/conf -v ~:/root -v "$(pwd)":/workspace $HELM_IMAGE -#docker run -it -v ~/conf:/conf -v ~:/root -v "$(pwd)":/workspace $HELM_IMAGE /bin/bash +if [ -f ~/conf/harbor.properties ] ; then + . ~/conf/harbor.properties +fi + +docker run -v ~/conf:/conf -v ~/.docker:/root/.docker -v ~/.kube:/root/.kube -v "$(pwd)":/workspace \ + -e HARBOR_USER="${HARBOR_USER}" \ + -e HARBOR_PASSWORD=${HARBOR_PASSWORD} \ + $HELM_IMAGE + +rm -rf openshift-chart +#docker run -it -v ~/conf:/conf -v ~/.docker:/.docker -v "$(pwd)":/workspace --entrypoint /bin/bash \ +# -e HARBA$HELM_IMAGE diff --git a/scripts/helm-functions.sh b/scripts/helm-functions.sh index d0509fe..57056e0 100644 --- a/scripts/helm-functions.sh +++ b/scripts/helm-functions.sh @@ -1,16 +1,20 @@ #!/bin/bash -CHART_PROJECT_NAME=${CHART_PROJECT_NAME:-openshift-chart-deployment} -CHART_VERSION=${CHART_VERSION:-3.2} +CHART_PROJECT_NAME=${CHART_PROJECT_NAME:-openshift-chart} +CHART_VERSION=${CHART_VERSION:-3.4} TRACE=${TRACE:-false} OS_PROJECT=${OS_PROJECT:-poms} OS_ENV=${OS_ENV:-test} +OS_STORAGE_TYPE=${OS_STORAGE_TYPE:-ocs-storagecluster-ceph-rbd} HELM_REPO=${HELM_REPO:-oci://registry.npohosting.nl/poms} -HELM_REGISTRY=${HELM_REGISTRY:-https://registry.npohosting.nl} +REGISTRY=${REGISTRY:-registry.npohosting.nl} +HELM_REGISTRY=${HELM_REGISTRY:-https://$REGISTRY} OC_CONTEXT_PROD=${OC_CONTEXT_PROD:=pomsp} OC_CONTEXT_TEST=${OC_CONTEXT_TEST:=pomst} +NAMESPACE=${NAMESPACE:-poms} + echo "helm build setup" if ! type os_app_name &> /dev/null ; then @@ -94,7 +98,7 @@ function deploy_application() { DIR=$1 OS_APPLICATION=$(os_app_name $DIR) - exit_code=$? + exit_code=$? if [[ $exit_code != '0' ]] ; then echo "Error with os_app_name function $exit_code" exit $exit_code @@ -176,7 +180,7 @@ function deploy_application() { ./$CHART_PROJECT_NAME --version $CHART_VERSION fi - echo "Helm upgrade $OS_APPLICATION-$OS_ENV" + echo "Helm upgrade $OS_APPLICATION-$OS_ENV $IMAGE" helm upgrade --install $OS_APPLICATION-$OS_ENV \ --history-max 3 \ --values $VALUES \