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

Where should i set the path to the chart #21

Closed
jwillker opened this issue Mar 13, 2020 · 4 comments
Closed

Where should i set the path to the chart #21

jwillker opened this issue Mar 13, 2020 · 4 comments

Comments

@jwillker
Copy link

HI!

I'm having a problem with the CI not correctly identifying the Chart directory

What I tried:

My workflow file:

name: Helm

on:
  pull_request:
    paths:
      - 'Charts/generic/**'
jobs:
  Lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Run chart-testing (lint)
        id: lint
        uses: helm/chart-testing-action@v1.0.0-alpha.3
        with:
          command: lint

What I hope will happen:

Run the lint only in Charts/generic directory.

How to configure this?

@unguiculus
Copy link
Member

chart-testing searches charts in directory charts by default. You can reconfigure this with a config file:

ct.yaml

chart-dirs:
  - my-chart-dir
- name: Run chart-testing (lint)
  id: lint
  uses: helm/chart-testing-action@v1.0.0-alpha.3
  with:
    command: lint
    config: ct.yaml

See:

@jwillker
Copy link
Author

chart-testing searches charts in directory charts by default. You can reconfigure this with a config file:

ct.yaml

chart-dirs:
  - my-chart-dir
- name: Run chart-testing (lint)
  id: lint
  uses: helm/chart-testing-action@v1.0.0-alpha.3
  with:
    command: lint
    config: ct.yaml

See:

Thanks! This works for me

@devth
Copy link

devth commented Apr 3, 2020

Is it a requirement to have charts in a subdirectory vs a single top-level chart?

My current structure, for example:

.
├── Chart.lock
├── Chart.yaml
├── README.md
├── charts
│   └── postgresql-8.6.12.tgz
├── ct.yaml
├── templates
│   ├── NOTES.txt
│   ├── _helpers.tpl
│   ├── config.yaml
│   ├── deployment.yaml
│   ├── ingress.yaml
│   ├── service.yaml
│   ├── serviceaccount.yaml
│   └── tests
│       └── test-connection.yaml
└── values.yaml

This is what you get when you generate with helm create mychart.

@devth
Copy link

devth commented Apr 3, 2020

Found the answer to this chatting on Slack.

Conclusion is that it's conventional to put charts in the charts dir instead of top level repo, so I am restructuring to:

.
├── README.md
├── charts
│   └── yetibot
│       ├── Chart.lock
│       ├── Chart.yaml
│       ├── charts
│       │   └── postgresql-8.6.12.tgz
│       ├── templates
│       │   ├── NOTES.txt
│       │   ├── _helpers.tpl
│       │   ├── config.yaml
│       │   ├── deployment.yaml
│       │   ├── ingress.yaml
│       │   ├── service.yaml
│       │   ├── serviceaccount.yaml
│       │   └── tests
│       │       └── test-connection.yaml
│       └── values.yaml
└── ct.yaml

See charts-repo-actions-demo as an example.

Thanks @scottrigby!

ghost pushed a commit to OMB-MOD/chart-testing-action that referenced this issue Dec 6, 2022
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

3 participants