Unable to deploy helm chart on remote kubernetes server using org.unbroken-dome.helm plugin

4/6/2020

I prefer https://unbroken-dome.github.io/projects/gradle-helm-plugin/ gradle plugin to deploy one of my application using helm chart on remote kubernetes cluster.

Please find below code snippet :

plugin and import section :

plugins {
   id 'org.unbroken-dome.helm' version '1.0.0'
   id 'org.unbroken-dome.helm-commands' version '1.0.0'
}
import org.unbrokendome.gradle.plugins.helm.command.tasks.*

gradle task section :

  helm {
        kubeConfig = file('src/main/resources/helm/kubeconfig')
        charts {
            app_chart {
                chartVersion = "1.0.0"
                filtering {
                    values.put 'imageRepository', "test-repo/appImage"
                    values.put 'imageTag', "1.0.0"
                }
                sourceDir = file 'src/main/resources/helm/app-helm'
            } 
        }
    }

task installApp(type: HelmInstallOrUpgrade) {
    releaseName = 'app-release'
    from helm.charts.app_chart
}

Execute task by command : gradle installApp

But getting error like commandLine[index - 1] must not be null. Please help to solve this error. Thanks in advance to reply.

-- Himanshu Patel
build.gradle
gradle-plugin
kubernetes-helm

0 Answers