title: Azure DevOps Pipeline deploy to Kubernetes with Helm 3: no such file or directory
body: <p>I have an Asp.net Core project, and I'm trying to create an Azure DevOps Pipeline for Kubernetes Deployment using Helm 3.</p>
  <p>The structure of the project is:</p>
  <p>Server
  charts
  server
  Chart.yaml
  Controllers
  etc..</p>
  <p>The current build pipeline, builds the docker image, and upload it to Azure Container Registry.</p>
  <p>The error occurs at the HelmDeploy task 'package' =&gt; chartPath:</p>
  <p><a href="https://i.stack.imgur.com/3TPkT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3TPkT.jpg" alt="enter image description here" /></a></p>
  <p>This is the Pipeline stage for Deployment:</p>
  <pre><code>  - 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
  </code></pre>
  <p>I tried many combinations without success:</p>
  <pre><code>chartPath: $(Build.Repository.LocalPath)/Server/charts/server
  chartPath: $(Build.SourcesDirectory)/Server/charts/server
  chartPath: **/Server/charts/server
  chartPath: Server/charts/server/
  </code></pre>
  <p>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.</p>