diff --git a/.github/workflows/cloud-platform-deploy-release.yml b/.github/workflows/cloud-platform-deploy-release.yml index e863e62..2065dd3 100644 --- a/.github/workflows/cloud-platform-deploy-release.yml +++ b/.github/workflows/cloud-platform-deploy-release.yml @@ -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: