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

add --extra-helm-args to ct lint #552

Merged
merged 1 commit into from
Jul 10, 2023
Merged

add --extra-helm-args to ct lint #552

merged 1 commit into from
Jul 10, 2023

Conversation

AndersBennedsgaard
Copy link
Contributor

What this PR does / why we need it:

Makes it possible to pass extra Helm arguments to ct lint, such as --strict.

Which issue this PR fixes

Does not strictly fix, but helps with #166

@cpanato cpanato closed this Jul 6, 2023
@cpanato cpanato reopened this Jul 6, 2023
@cpanato
Copy link
Member

cpanato commented Jul 6, 2023

@AndersBennedsgaard can you please rebase? thanks for this PR

@cpanato
Copy link
Member

cpanato commented Jul 6, 2023

and need to generate the docs.

@AndersBennedsgaard
Copy link
Contributor Author

I completely forgot all about this PR. I have synced the two repos :)

and need to generate the docs.

Is there a way to auto-generate/-update docs (doc/ct_lint.md I guess?), or do I have to manually do this?

@cpanato
Copy link
Member

cpanato commented Jul 6, 2023

I completely forgot all about this PR. I have synced the two repos :)

and need to generate the docs.

Is there a way to auto-generate/-update docs (doc/ct_lint.md I guess?), or do I have to manually do this?

          go build -o ct-bin ./ct/main.go
          ./ct-bin doc-gen

also please do a rebase and remove the unnecessary commits, thanks

@AndersBennedsgaard
Copy link
Contributor Author

@cpanato does it look correct now? (I had some issues with rebasing, since I never use it)

ct/cmd/root.go Outdated Show resolved Hide resolved
Signed-off-by: AndersBennedsgaard <[email protected]>
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@cpanato cpanato enabled auto-merge (squash) July 10, 2023 09:52
@cpanato cpanato merged commit 0d4ab80 into helm:main Jul 10, 2023
bjw-s referenced this pull request in bjw-s/dotfiles Jul 11, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [helm-ct](https://github.com/helm/chart-testing) | minor | `3.8.0`
-> `3.9.0` |

---

### Release Notes

<details>
<summary>helm/chart-testing (helm-ct)</summary>

###
[`v3.9.0`](https://github.com/helm/chart-testing/releases/tag/v3.9.0)

[Compare
Source](https://github.com/helm/chart-testing/compare/v3.8.0...v3.9.0)

##### What's Changed

- update goreleaser flags by
[@&#8203;cpanato](https://github.com/cpanato) in
[https://github.com/helm/chart-testing/pull/539](https://github.com/helm/chart-testing/pull/539)
- feat: verify if targetBranch is present in git repo by
[@&#8203;fty4](https://github.com/fty4) in
[https://github.com/helm/chart-testing/pull/511](https://github.com/helm/chart-testing/pull/511)
- add github grouping of log lines by
[@&#8203;joejulian](https://github.com/joejulian) in
[https://github.com/helm/chart-testing/pull/556](https://github.com/helm/chart-testing/pull/556)
- fix for ct install getting stuck when printing logs: close readers
when done with reading by
[@&#8203;skylenet](https://github.com/skylenet) in
[https://github.com/helm/chart-testing/pull/557](https://github.com/helm/chart-testing/pull/557)
- update golangci and helm by
[@&#8203;cpanato](https://github.com/cpanato) in
[https://github.com/helm/chart-testing/pull/575](https://github.com/helm/chart-testing/pull/575)
- add --extra-helm-args to ct lint by
[@&#8203;AndersBennedsgaard](https://github.com/AndersBennedsgaard) in
[https://github.com/helm/chart-testing/pull/552](https://github.com/helm/chart-testing/pull/552)
- Fix for Dockerfile smell DL3048 by
[@&#8203;grosa1](https://github.com/grosa1) in
[https://github.com/helm/chart-testing/pull/543](https://github.com/helm/chart-testing/pull/543)

##### New Contributors

- [@&#8203;fty4](https://github.com/fty4) made their first
contribution in
[https://github.com/helm/chart-testing/pull/511](https://github.com/helm/chart-testing/pull/511)
- [@&#8203;joejulian](https://github.com/joejulian) made their first
contribution in
[https://github.com/helm/chart-testing/pull/556](https://github.com/helm/chart-testing/pull/556)
- [@&#8203;skylenet](https://github.com/skylenet) made their first
contribution in
[https://github.com/helm/chart-testing/pull/557](https://github.com/helm/chart-testing/pull/557)
- [@&#8203;AndersBennedsgaard](https://github.com/AndersBennedsgaard)
made their first contribution in
[https://github.com/helm/chart-testing/pull/552](https://github.com/helm/chart-testing/pull/552)
- [@&#8203;grosa1](https://github.com/grosa1) made their first
contribution in
[https://github.com/helm/chart-testing/pull/543](https://github.com/helm/chart-testing/pull/543)

**Full Changelog**:
helm/chart-testing@v3.8.0...v3.9.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNi42LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>
@hypery2k
Copy link

having the same issues within gitlab:

$ git status
HEAD detached at b817f07
nothing to commit, working tree clean
$ git branch
* (HEAD detached at b817f07)
$ git fetch origin
$ ct lint --config charttesting-conf.yaml
Linting charts...
>>> helm version --template {{ .Version }}
>>> git rev-parse --is-inside-work-tree
>>> git rev-parse --verify main
------------------------------------------------------------------------------------------------------------------------
No chart changes detected.
------------------------------------------------------------------------------------------------------------------------
failed linting charts: failed identifying charts to process: targetBranch 'main' does not exist
Error: failed linting charts: failed identifying charts to process: targetBranch 'main' does not exist
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

With v3.8.0 it works:

$ git status
HEAD detached at d05b9db
nothing to commit, working tree clean
$ git branch
* (HEAD detached at d05b9db)
$ git fetch origin
$ ct lint --config charttesting-conf.yaml
Linting charts...
>>> helm version --template {{ .Version }}
>>> git rev-parse --is-inside-work-tree
>>> git merge-base origin/main HEAD
>>> git diff --find-renames --name-only 43bcf6ea0e66b[26]...
------------------------------------------------------------------------------------------------------------------------
No chart changes detected.
------------------------------------------------------------------------------------------------------------------------
All charts linted successfully
Cleaning up project directory and file based variables
00:01
Job succeeded

Can reproduce it within multiple gitlab installations.

joejulian added a commit to joejulian/chart-testing that referenced this pull request Aug 16, 2023
joejulian added a commit to joejulian/chart-testing that referenced this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants