Skip to content

Commit

Permalink
NIT-994 pipeline for installing helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahzad Chaudhry committed Dec 19, 2023
1 parent 7bba845 commit 9a84769
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/cloud-platform-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,27 @@ jobs:
kubectl config set-credentials deploy-user --token=${{ secrets.KUBE_TOKEN }}
kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE}
kubectl config use-context ${KUBE_CLUSTER}
kubectl config set-context --current --namespace=${KUBE_NAMESPACE}
kubectl get all
# Helm will not deploy unless this secret is present
if [ -z ${SECRET} ]
if [ -z ${SECRET+x} ]
then
SECRET=$(openssl rand -base64 20)
echo "Unset secret"
echo "Unset secret value = $SECRET"
else
SECRET=$(awk '{print substr($0, 19)}' <<< $(kubectl get secrets alfresco-content-services-alfresco-repository-properties-secret -o jsonpath='{.data.alfresco-global\.properties}' | base64 -d))
echo "Set secret"
echo "Set secret value = $SECRET"
fi
echo "The value of secret that has finally be set = $SECRET"
# This is the S3 bucket where docs are stored
export BUCKET_NAME=$(awk '{print substr($0, 0)}' <<< $(kubectl get secrets s3-bucket-output -o jsonpath='{.data.bucket_name}' | base64 -d))
cd alfresco-content-services
helm upgrade --install alfresco-content-services . --values=./values.yaml \
--namespace hmpps-delius-alfrsco-poc \
--set s3connector.config.bucketName=$BUCKET_NAME \
--set global.tracking.sharedsecret=$SECRET
env:
Expand Down

0 comments on commit 9a84769

Please sign in to comment.