I have an Asp.net Core project, and I'm trying to create an Azure DevOps Pipeline for Kubernetes Deployment using Helm 3.
The structure of the project is:
Server charts server Chart.yaml Controllers etc..
The current build pipeline, builds the docker image, and upload it to Azure Container Registry.
The error occurs at the HelmDeploy task 'package' => chartPath:
This is the Pipeline stage for Deployment:
- stage: 'Deploy'
displayName: 'Deploy the container'
dependsOn: Build
jobs:
- deployment: Deploy
displayName: Deploy
pool:
vmImage: 'ubuntu-latest'
environment: 'staging'
strategy:
runOnce:
deploy:
steps:
- task: HelmInstaller@0
inputs:
helmVersion: 'latest'
installKubectl: true
- task: HelmDeploy@0
inputs:
command: 'package'
chartPath: Server/charts/server
- task: HelmDeploy@0
inputs:
connectionType: 'Kubernetes Service Connection'
kubernetesServiceConnection: 'Staging-592588480'
namespace: 'staging'
command: 'upgrade'
chartType: 'FilePath'
chartPath: $(Build.ArtifactStagingDirectory)/server
I tried many combinations without success:
chartPath: $(Build.Repository.LocalPath)/Server/charts/server
chartPath: $(Build.SourcesDirectory)/Server/charts/server
chartPath: **/Server/charts/server
chartPath: Server/charts/server/
According to the documentation, Helm 3 on azure pipelines do not need 'init' command, and the 'upgrade' command will install the charts if not exists.