Skip to content

jf helm package fails to collect build-info when Chart.yaml and packaged chart archive are in different directories.#501

Open
kumadee wants to merge 2 commits into
jfrog:mainfrom
kumadee:main
Open

jf helm package fails to collect build-info when Chart.yaml and packaged chart archive are in different directories.#501
kumadee wants to merge 2 commits into
jfrog:mainfrom
kumadee:main

Conversation

@kumadee

@kumadee kumadee commented Jul 7, 2026

Copy link
Copy Markdown
  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

Original issue was raised as a part of Jfrog support ticket 426969.

Here is the problem statement:
When jf helm package command is executed with multiple options contains different paths e.g. chart directory path, chart archive destination path, keyring path and all of these path are different, then the command fails as it expects a Chart.yaml in each of these directories.

In the below log the Chart.yaml is in ./target/my-app-chart and the my-app-384-SNAPSHOT.tgz is successfully created in ./target/helm. For some reason, the jf cli expects the Chart.yaml to be always in the same directory as the Chart.yaml.

$ /home/kumadee/git/dev/SCM/scms.Pipelinelibraries/jf helm package ./target/my-app-chart -d ./target/helm
08:53:39 [Debug] JFrog CLI version: 2.112.0
08:53:39 [Debug] OS/Arch: linux/amd64
08:53:39 [Debug] Trace ID for JFrog Platform logs: 6617edb913131a61
08:53:39 [Info] Running Helm  package .
Running alias script args: package ./target/my-app-chart -d target/helm/
08:53:39 [Debug] Sending HTTP GET request to: https://myartifactory.example.com/artifactory/api/system/version
08:53:39 [Debug] JFrog CLI version: 2.109.0
08:53:39 [Debug] OS/Arch: linux/amd64
08:53:39 [Debug] Trace ID for JFrog Platform logs: 893d29af54d911b0
08:53:39 [Info] Running Helm  package .
08:53:39 [Debug] Sending HTTP GET request to: https://myartifactory.example.com/artifactory/api/system/version
Successfully packaged chart and saved it to: target/helm/my-app-384-SNAPSHOT.tgz
08:53:39 [Debug] Artifactory response: 200 
08:53:39 [Debug] Artifactory Call Home: Sending info...
08:53:39 [Debug] Sending HTTP POST request to: https://myartifactory.example.com/artifactory/api/system/usage
08:53:39 [Debug] Sending HTTP POST request to: https://myartifactory.example.com/jfconnect/api/v1/backoffice/metrics/log
08:53:39 [Info] Collecting build info for executed helm package command
08:53:39 [Debug] Reading build general details from: /tmp/jfrog-kumadee/builds/2cdd5ec3b76db5669ce1c92bfe1d22492f77fc2409ab2c4c05655ef413006d81/partials
08:53:39 [Debug] Creating temp build file at: /tmp/jfrog-kumadee/builds/2cdd5ec3b76db5669ce1c92bfe1d22492f77fc2409ab2c4c05655ef413006d81
08:53:39 [Info] Build info saved locally. Use 'jf rt bp test-local-build 7-helm ' to publish it to Artifactory.
08:53:39 [Info] Trace ID for JFrog Platform logs: 893d29af54d911b0
08:53:39 [Error] failed to collect build info: failed to create Helm FlexPack: failed to load Chart.yaml: failed to read Chart.yaml: open /home/kumadee/git/dev/clear/my-app/k8s/target/helm/Chart.yaml: no such file or directory
08:53:39 [Debug] Artifactory response: 200 
08:53:39 [Debug] Artifactory Call Home: Sending info...
08:53:39 [Debug] Sending HTTP POST request to: https://myartifactory.example.com/artifactory/api/system/usage
08:53:39 [Debug] Sending HTTP POST request to: https://myartifactory.example.com/jfconnect/api/v1/backoffice/metrics/log
08:53:39 [Info] Trace ID for JFrog Platform logs: 6617edb913131a61
08:53:39 [Error] helm package failed: exit status 1

Proposed solution: Filter out the different paths given in the helm package CHART_DIR .... command. There can be only 1 chart directory in the command, which can be checked by the presence of Chart.yaml.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@kumadee

kumadee commented Jul 7, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@kumadee

kumadee commented Jul 7, 2026

Copy link
Copy Markdown
Author

recheck

kumadee added a commit to kumadee/jfrog-cli that referenced this pull request Jul 7, 2026
kumadee added a commit to kumadee/jfrog-cli that referenced this pull request Jul 10, 2026
kumadee added a commit to kumadee/jfrog-cli that referenced this pull request Jul 10, 2026
@naveenku-jfrog naveenku-jfrog added the safe to test Approve running integration tests on a pull request label Jul 16, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jul 16, 2026
@naveenku-jfrog

Copy link
Copy Markdown
Collaborator

PR's branch is out of sync and all cli integration tests are failing, please fix these first.

kumadee added a commit to kumadee/jfrog-cli that referenced this pull request Jul 16, 2026
kumadee added 2 commits July 16, 2026 14:27
…n helm chart archive

When `helm package /path/to/chart --destination /tmp/target` is
executed, we need to filter out directories which doesn't contain
Chart.yaml.
@kumadee

kumadee commented Jul 16, 2026

Copy link
Copy Markdown
Author

I have rebased the PR branch with the default branch. Unit tests are passing on my local. Waiting for the integration tests to be executed on CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants