<p>I am trying to run <code>helm command</code> in the Jenkinsfile pipeline and I am getting an error that it is expecting at least 1 argument. Below is the code:</p>
<pre><code>stage ('Create and Deploy to k8s Dev Environment') {
            //agent {label 'docker-maven-slave'}
            options {
                skipDefaultCheckout()
            }
            steps {                    
                    command &quot;&quot;&quot;
                        echo &quot;hiiiiiiii&quot;
                        helm template -f portal-chart/values-dev.yaml --set image.tag=${IMAGE} | \
                        kubectl apply --server=https://dddd.gggg.com:443 --token='${DEV_NS_TOKEN}' --insecure-skip-tls-verify=true -f -
                    &quot;&quot;&quot;
</code></pre>
<p>}</p>
<p>Below are the logs:</p>
<pre><code>+ echo hiiiiiiii
hiiiiiiii
+ helm template -f portal-chart/values-dev.yaml --set image.tag=bde8ac5
+ kubectl apply --server=https://dddd.gggg.com:443 --token=eyjsfkjdhfkjdhfkjdhfkjhfdjhfjdfjZCI6IlI5Zi1YOFpnd2NzcUpUR1czTG45aUhwR2dHMkYx --insecure-skip-tls-verify=true -f -
Error: &quot;helm template&quot; requires at least 1 argument

Usage:  helm template [NAME] [CHART] [flags]
error: no objects passed to apply
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
</code></pre>
<p>Please verify my <code>helm command</code> and let me know if I am missing something over here.</p>

Pritish
<p>You must specify the <code>Chart</code>parameter.</p>
<pre><code>helm template --help
   Usage:
     helm template [NAME] [CHART] [flags]
</code></pre>
<p>In your case it should be</p>
<pre><code> helm template -f portal-chart/values-dev.yaml --set image.tag=${IMAGE} portal-chart
</code></pre>
<p><code>-f</code> only specifies the values file! You also must specify for which chart it should be applied on.</p>
