-
Notifications
You must be signed in to change notification settings - Fork 1
feat(infra): Add workflow for helm lint #28
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
944bdf9
feat: Add helm linter
alex131290 f096644
update version of chart-testing-action
alex131290 f97a19a
fix
alex131290 6f4b748
fix
alex131290 28a5837
fix
alex131290 4b0306e
fix
alex131290 34172b8
fix
alex131290 830e8c5
fix
alex131290 e560bcc
fix
alex131290 9e73419
fix
alex131290 acf6e2c
fix
alex131290 2cb0fcf
fix
alex131290 36c3513
fix
alex131290 5de9ce5
fix
alex131290 5e2652b
fix: Use branch from github event instead of hard coded, change warni…
alex131290 f778548
chore: Add chart dirs input
alex131290 301e5e5
fix comments
alex131290 fee3427
chore: remove non-default lint conf, remove unused helm conf
alex131290 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| check-version-increment: false | ||
| validate-maintainers: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| rules: | ||
| braces: | ||
| level: error | ||
| brackets: | ||
| level: error | ||
| colons: | ||
| level: error | ||
| commas: | ||
| level: error | ||
| comments: | ||
| level: error | ||
| document-end: disable | ||
| document-start: disable # No --- to start a file | ||
| hyphens: | ||
| level: warning | ||
| indentation: | ||
| level: warning | ||
shimoncohen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| key-duplicates: enable | ||
shimoncohen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| line-length: disable # Lines can be any length | ||
| new-line-at-end-of-file: enable | ||
| new-lines: | ||
| type: unix | ||
| trailing-spaces: enable | ||
| truthy: | ||
| level: warning | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Lint and Test Charts | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| chartDirs: | ||
| description: "The root dir or dirs (separated with commas)" | ||
| type: string | ||
| required: false | ||
| default: "." | ||
|
|
||
| jobs: | ||
| lint-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Checkout Shared Workflows repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: MapColonies/shared-workflows | ||
| path: shared-workflows | ||
| token: ${{ secrets.GH_PAT }} | ||
|
|
||
| - name: Set up Helm | ||
| uses: azure/setup-helm@v4.2.0 | ||
| with: | ||
| version: v3.16.3 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.x' | ||
| check-latest: true | ||
|
|
||
| - name: Set up chart-testing | ||
| uses: helm/chart-testing-action@v2.6.1 | ||
|
|
||
| - name: Run chart-testing (list-changed) | ||
| id: list-changed | ||
| run: | | ||
| changed=$(ct list-changed --chart-dirs ${{ inputs.chartDirs }} --target-branch ${{ github.event.repository.default_branch }} --config shared-workflows/.github/configs/ct.yaml) | ||
| echo "changed=$changed" | ||
| if [[ -n "$changed" ]]; then | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Run chart-testing (lint) | ||
| if: steps.list-changed.outputs.changed == 'true' | ||
| run: ct lint --chart-dirs ${{ inputs.chartDirs }} --target-branch ${{ github.event.repository.default_branch }} --config shared-workflows/.github/configs/ct.yaml --lint-conf shared-workflows/.github/configs/lintconf.yaml | ||
|
|
||
| - name: Create kind cluster | ||
| if: steps.list-changed.outputs.changed == 'true' | ||
| uses: helm/kind-action@v1.10.0 | ||
|
|
||
| - name: Run chart-testing (install) | ||
| if: steps.list-changed.outputs.changed == 'true' | ||
| run: ct install --chart-dirs ${{ inputs.chartDirs }} --target-branch ${{ github.event.repository.default_branch }} --config shared-workflows/.github/configs/ct.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.