Skip to content

Commit 7ec28ca

Browse files
authored
adding ct lint action (#113)
1 parent dd0529e commit 7ec28ca

6 files changed

Lines changed: 91 additions & 6 deletions

File tree

.github/workflows/chart-lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Chart Lint
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v1
14+
15+
- name: Lint Helm charts
16+
uses: helm/chart-testing-action@v1.0.0-rc.2
17+
with:
18+
command: lint
19+
config: ct.yaml

chart_schema.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: str()
2+
home: str(required=False)
3+
version: str()
4+
appVersion: any(str(), num(), required=False)
5+
description: str(required=False)
6+
keywords: list(str(), required=False)
7+
sources: list(str(), required=False)
8+
maintainers: list(include('maintainer'), required=False)
9+
icon: str(required=False)
10+
engine: str(required=False)
11+
condition: str(required=False)
12+
tags: str(required=False)
13+
deprecated: bool(required=False)
14+
kubeVersion: str(required=False)
15+
annotations: map(str(), str(), required=False)
16+
---
17+
maintainer:
18+
name: str(required=False)
19+
email: str(required=False)
20+
url: str(required=False)

charts/exporter/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
name: exporter
2-
version: v0.0.1
2+
version: v1.1.0
3+
apiVersion: v2

charts/exporter/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
app_name: deploytime-exporter
2-
#env_from_secrets:
3-
#- github-secret
4-
#extraEnv:
5-
#- name: APP_LABEL
6-
# value: foo
2+
# env_from_secrets:
3+
# - github-secret
4+
# extraEnv:
5+
# - name: APP_LABEL
6+
# value: foo
77
source_context_dir: exporters/committime
88
source_ref: master
99
source_url: https://github.com/redhat-cop/pelorus.git

ct.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chart-dirs:
2+
- charts
3+
validate-maintainers: false

lintconf.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
rules:
3+
braces:
4+
min-spaces-inside: 0
5+
max-spaces-inside: 0
6+
min-spaces-inside-empty: -1
7+
max-spaces-inside-empty: -1
8+
brackets:
9+
min-spaces-inside: 0
10+
max-spaces-inside: 0
11+
min-spaces-inside-empty: -1
12+
max-spaces-inside-empty: -1
13+
colons:
14+
max-spaces-before: 0
15+
max-spaces-after: 1
16+
commas:
17+
max-spaces-before: 0
18+
min-spaces-after: 1
19+
max-spaces-after: 1
20+
comments:
21+
require-starting-space: true
22+
min-spaces-from-content: 2
23+
document-end: disable
24+
document-start: disable # No --- to start a file
25+
empty-lines:
26+
max: 2
27+
max-start: 0
28+
max-end: 0
29+
hyphens:
30+
max-spaces-after: 1
31+
indentation:
32+
spaces: consistent
33+
indent-sequences: whatever # - list indentation will handle both indentation and without
34+
check-multi-line-strings: false
35+
key-duplicates: enable
36+
line-length: disable # Lines can be any length
37+
new-line-at-end-of-file: disable
38+
new-lines:
39+
type: unix
40+
trailing-spaces: enable
41+
truthy:
42+
level: warning

0 commit comments

Comments
 (0)