I am trying to install or upgrade helm chart through azure devops pipeline, but the pipeline getting failed with the following error.
WARNING: Merged "akscluster-admin" as current context in
/home/AzDevOps/.kube/config
/agent/_work/_temp/azureclitaskscript1685671456745.sh: line 5: helm list -n
namespace - q | grep "splunk": command not found
Splunk is already installed. Performing splunk upgrade
Error: UPGRADE FAILED: "splunk" has no deployed release
Below is the pipeline task:
check_splunk= helm list -n devns - q | grep "splunk"
if [ -n "check_splunk" ]; then
echo " Splunk is already installed. Performing splunk upgrade"
helm -n devns upgrade splunk --values ./values.yaml
$(Build.SourcesDirectory)/splunk
else
echo "splunk is not installed, performing splunk installation"
helm dependency update $(Build.SourcesDirectory)/splunk
helm -n devns install splunk --values ./values.yaml
$(Build.SourcesDirectory)/splunk
fi
also i have helm install task on the same pipeline, but its still failing. am i missing something here. thanks in advance for your help.