This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
GH-820: Strictly lint helm files #63
Merged
jack-r-warren
merged 15 commits into
broadinstitute:master
from
jack-r-warren:jack-r-warren/GH-820-pr-helm-lint
Jul 13, 2020
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1436e5a
Add a first attempt as a separate action
fe4862f
Fix values file per helm lint --strict
7b69b3d
Change my test action to use a container and commands
de32906
Remove quotes to match other actions' style
47efa4a
Add a summary of the note from the obsolete helmchart-test.yml file
cd21b04
Delete this obsolete file, it is superseded by 47efa4aa
71cfce5
Delete this obsolete file, it is superseded by 47efa4aa
d2c00d7
Merge remote-tracking branch 'origin/jack-r-warren/GH-820-pr-helm-lin…
5296e16
Test for any functionality differences with the history fetch
9d09911
Just use `ct lint` directly to get at the version/maintainer checks
b191554
Use -all so we don't have to pull in all the git history
6ce438a
It seems the fetch may be unavoidable, even with --all
0e1b5f5
Fix `ct` command
714e996
A few more comments because none of this is documented
afa751a
Bump version
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 was deleted.
Oops, something went wrong.
This file contains 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,54 @@ | ||
# This workflow triggers helm linting on PRs and master branch pushes | ||
# that affect helm files | ||
name: Helm Chart Linting on Pull Requests and Master | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- helm/wfl/** | ||
pull_request: | ||
paths: | ||
- helm/wfl/** | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/helmpack/chart-testing:v3.0.0-rc.1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# `ct lint` likes to find charts on its own using git | ||
# history. | ||
- name: Fetch History | ||
run: git fetch --prune --unshallow | ||
|
||
# We keep this around because it does version bump and | ||
# maintenance checks outside of what `helm lint` does. | ||
# It is separate because this needs to be at the top of | ||
# the repo, and it is cleaner to use the | ||
# working-directory directive below. | ||
- name: Chart Test Basic Lint | ||
run: ct lint --config ct.yaml | ||
|
||
# These are each actually run by `ct lint`, but we want | ||
# to see their output and set arguments ourselves | ||
# (--strict). Because this GitHub Action is infrequently | ||
# run, duplicating the checks for the sake of keeping | ||
# this Action simple is worth it. | ||
- name: Helm Chart Strict Lint | ||
working-directory: ./helm/wfl | ||
run: | | ||
helm lint --strict --namespace default | ||
yamale --schema /etc/ct/chart_schema.yaml Chart.yaml | ||
yamllint --config-file /etc/ct/lintconf.yaml --strict Chart.yaml values.yaml | ||
|
||
# We could theoretically run `ct install` or | ||
# something else here, but there were breadcrumbs | ||
# in previous Helm lint actions that installing | ||
# fails on hyphenated names, so more work would | ||
# need to be done to eliminate hyphens from | ||
# generated names |
This file contains 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 |
---|---|---|
|
@@ -4,10 +4,10 @@ description: A Helm chart for deploy WorkFlow Launcher on Kubernetes | |
|
||
type: application | ||
|
||
version: 0.2.6 | ||
version: 0.2.7 | ||
|
||
home: https://github.com/broadinstitute/wfl | ||
appVersion: 0.2.6 | ||
appVersion: 0.2.7 | ||
Comment on lines
+7
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though my change to values.yaml is a no-op, the linting wants a version bump here. If we want, we can revert afa751a to get rid of this version bump (linting will complain but it won't affect anything). |
||
keywords: | ||
- clojure | ||
- cloud | ||
|
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm targeting helm/wfl specifically because we'd have to reconfigure this action a bit if we added other charts. Basic linting (just errors) will work on everything because chart-testing has logic to find charts based on ct.yaml, but the strict linting is just done via command line and uses a working directory of helm/wfl.