Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Nov 16, 2024
1 parent ab02c60 commit 26c1bcf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 12 additions & 2 deletions helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 9 additions & 5 deletions scripts/helm-functions.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 26c1bcf

Please sign in to comment.