kokuwaio / helm-maven-plugin

Simple plugin to package helm charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't helm-maven-plugin:6.0.0:dependency-build on multiple helm projects

Neola opened this issue · comments

commented

Is this a request for help?:


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Environment (plugin version, maven version, OS, ...):
helm-maven-plugin: 6.0.0
maven : 3.5.4
Linux
helm-maven-plugin configurarion as below,

${chartDir}
${chartVersion}

helm-repo
${helm.upload.repo}
ARTIFACTORY



helm-repo
${helm.release.arm.repo}


${helm.download.url}
${project.basedir}/target/home/helm
${project.build.directory}/home/helm/repository
${project.build.directory}/helm/package
true
false

What happened:
we have several helm modules in one project, e.g. A and B, and B depend on B,
cmd: mvn clean package , then A bulid successfully
but when run to package B, we met below error,
[ERROR] Error: no cached repository for helm-repo found. (try 'helm repo update'): open ~/main-cache/B/target/home/helm/repository/helm-repo-index.yaml: no such file or directory

Seems after run A, and helm init add helm-repo in repo list, then run B, it will not set helm home in B/target. Before we use 5.5, it has no such issue.
local cache should be not used, as we define the repository cach in plugin configuration

What you expected to happen:
we shoud ignore the local repo, and generate helm home in the new path.

How to reproduce it (as minimally and precisely as possible):
add two modules in the same project, and run mvn package

Anything else we need to know:

commented

Seems it detect repo exist, then it will skip to config repository cache dir, thus, it failed for the following another helm module package.
In fact for the B module, the repository cache dir is not same, we configure it as ${project.build.directory}/home/helm/repository.

commented

we should always execute add-repo, as the repo url maybe vary for different helm module

commented

hi ,
I add ${project.build.directory}/home/helm/repository/repositories.yaml, it works