Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error dealing with charts with dependencies #6

Closed
davidkarlsen opened this issue Dec 10, 2019 · 14 comments
Closed

Error dealing with charts with dependencies #6

davidkarlsen opened this issue Dec 10, 2019 · 14 comments
Assignees

Comments

@davidkarlsen
Copy link
Member

davidkarlsen commented Dec 10, 2019

Look at https://github.com/evryfs/helm-charts/commit/7758626b628d9b2a86d06f56709e0f72450360d0/checks?check_suite_id=351179142 - it seems the releaser has problems dealing with charts that have dependencies, as it fails with:

Run helm/chart-releaser-action@v1.0.0-alpha.1
helm-charts
Looking up latest tag...
Discovering changed charts since 'c7a9c284c1570187a269698c01d1821ac775917c'...
Installing chart-releaser...
Packaging chart 'charts/mcrouter'...
Error: Couldn't load repositories file (/home/runner/.helm/repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)
##[error]Node run failed with exit code 1
@unguiculus unguiculus self-assigned this Dec 10, 2019
@unguiculus
Copy link
Member

Thanks for reporting. I'll look into it. From what I've seen, Helm needs to be installed in the first place. This is an oversight because initial testing of the set of actions happened in one workflow and Helm was already there in that case.

@unguiculus
Copy link
Member

I looked into this. Installing Helm alone doesn't really solve this. We would also have to add chart repos for the dependencies. The question is whether this should be part of the chart-releaser action. It may be better to provide a separate action that installs Helm. That could be generally useful anyways. It probably would then look like this:

name: release

on:
  push:
    branches:
      - master

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Configure Git
        run: |
          echo "GITHUB_ACTOR: $GITHUB_ACTOR"
          git config user.name "$GITHUB_ACTOR"
          git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

      - name: Install Helm
        uses: helm/helm-install-action@v1.0.0

      - name: Add Helm repos
        run: |
          helm repo add foo https://foo.helm.example.com
          helm repo add bar https://bar.helm.example.com

      - name: Run chart-releaser
        uses: helm/chart-releaser-action@v1.0.0-alpha.1
        env:
          CR_TOKEN: "${{ secrets.CR_TOKEN }}"

@davidkarlsen
Copy link
Member Author

davidkarlsen commented Dec 12, 2019

Same for the chart-testing-action.
In the old action I used (a non-helm one) repos were added by defining them in the ct-config - maybe that could be done here too?: https://github.com/evryfs/helm-charts/blob/feature/mcrouter-bitnami-memcached/ct-config.yaml && evryfs/helm-charts@82799da

@scottrigby
Copy link
Member

Yep that works perfectly for the chart-testing-action 👍 It's a little more of a pain for chart-releaser-action, but it also works. Here's a test in the demo repo. WDYT? helm/charts-repo-actions-demo#7

@davidkarlsen
Copy link
Member Author

I think the old action I used where only configuration of ct-config.yaml was needed was more elegant - then you don't need to mess around with helm-download and configuration.

@davidkarlsen
Copy link
Member Author

The other one seems to automate dependency update: https://github.com/J12934/helm-gh-pages-action/blob/master/index.js#L68

@davidkarlsen
Copy link
Member Author

Ah - got it to work for testing - had forgotten to pass the config to the action.

@scottrigby
Copy link
Member

@davidkarlsen do you feel good about closing this issue? Or maybe we should clearly document this somewhere before closing

@davidkarlsen
Copy link
Member Author

Mmmm, it was never fixed? Chart-testing works as it seems to read the config-file. But last time I tested the releaser it failed.

@douglascamata
Copy link

douglascamata commented Jun 2, 2020

The releaser still fails with dependencies while my config file is in the repo: https://github.com/newrelic/helm-charts/runs/713817996

@torstenwalter
Copy link

There is a GitHub action to install helm https://github.com/Azure/setup-helm

@planetf1
Copy link

At a minimum it would be good if the docs were updated to explain how to handle charts with dependencies. I'm just experimenting with this action in https://github.com/odpi/egeria/issues/1514 and found the same issue ie, when I had my released charts posted to my new pages (nice thanks!):

$ helm install lab odpi-egeria-lab                                                                                          [11:06:57]
Error: found in Chart.yaml, but missing in charts/ directory: kafka

I got the same issue for an older chart (requirements.yaml) and newer (dependencies in Chart.yaml) - I'll look at the fragment above & aim to automate the repo add (and presumably dependency update)

@planetf1
Copy link

Apologies - user error. I had been using local paths rather than referring to my new repo. Dependencies now do seem to be handled correctly

@davidkarlsen
Copy link
Member Author

This works now, so closing.

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

No branches or pull requests

6 participants