deviceinsight / helm-maven-plugin

Maven Plugin for Helm Charts
Apache License 2.0
46 stars 22 forks source link

Issue with helm publishing #79

Open talktolanka opened 3 years ago

talktolanka commented 3 years ago

Hi,

I am having issue when executing mvn helm:deploy and getting following error.

Error creating/publishing helm chart: Unexpected status code when executing POST request to chart repo https://mysitename.io/chartrepo/library: 404 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.deviceinsight.helm:helm-maven-plugin:2.8.0:deploy (default-cli) on project elastic-dijkstra: Error creating/publishing helm chart: Unexpected status code when executing POST request to chart repo https://mysitename.io/chartrepo/library: 404

I also tried the version 2.8.0

Please help on this

pvorb commented 3 years ago

Hi, can you please tell me what kind of Helm repository this is? ChartMuseum, Artifactory, ...?

talktolanka commented 3 years ago

ChartMuseum based on Harbor registry

On Tue, Dec 22, 2020 at 2:58 PM Paul Vorbach notifications@github.com wrote:

Hi, can you please tell me what kind of Helm repository this is? ChartMuseum, Artifactory, ...?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deviceinsight/helm-maven-plugin/issues/79#issuecomment-749443792, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBYAIHSBM2ZG6455KOFRKDSWBREVANCNFSM4VE7QQOA .

pvorb commented 3 years ago

I didn't manage to have a look at it today, so this will have to wait until next year.

catsem commented 3 years ago

I managed to get it working with our helm repo hosted on nexus Maybe this works for your harbor registry too:


      <groupId>com.deviceinsight.helm</groupId>
      <artifactId>helm-maven-plugin</artifactId>
      <version>2.9.0</version>
      <configuration>
        <chartRepoUsername>${nexus-user}</chartRepoUsername>
        <chartRepoPassword>${nexus-pass}</chartRepoPassword>
        <addIncubatorRepo>false</addIncubatorRepo>
        <chartFolder>src/main/helm</chartFolder>
        <chartDeleteUrl>https://mynexus/nexus/repository/helm-repo/${project.artifactId}-${project.model.version}.tgz</chartDeleteUrl>
        <chartPublishUrl>https://mynexus/nexus/repository/helm-repo/${project.artifactId}-${project.model.version}.tgz</chartPublishUrl>
        <chartPublishMethod>PUT</chartPublishMethod>
        <skipSnapshots>false</skipSnapshots>
        <helmVersion>3.2.0</helmVersion>
        <strictLint>true</strictLint>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>package</goal>
            <goal>lint</goal>
            <goal>template</goal>
            <goal>deploy</goal>
          </goals>
        </execution>
      </executions>
    </plugin>``