Merge "Enable templates linting"

This commit is contained in:
Zuul 2020-07-13 20:33:46 +00:00 committed by Gerrit Code Review
commit 86f567543f
9 changed files with 52 additions and 17 deletions

View File

@ -80,7 +80,7 @@ spec:
- metadata:
name: artifactory-data
spec:
accessModes: [ "ReadWriteOnce" ]
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.storage.requests.storage }}

View File

@ -19,4 +19,3 @@ sources:
- https://opendev.org/openstack/openstack-helm
maintainers:
- name: OpenStack-Helm Authors

View File

@ -21,6 +21,6 @@ metadata:
name: sonobuoy-plugins
data:
{{ range .Values.conf.plugins }}
{{- include "helm-toolkit.snippets.values_template_renderer" ( dict "envAll" $envAll "template" .data "key" .name ) | indent 4 }}
{{- include "helm-toolkit.snippets.values_template_renderer" ( dict "envAll" $envAll "template" .data "key" .name ) | indent 2 }}
{{ end }}
{{- end }}

View File

@ -31,4 +31,4 @@
roles:
- deploy-kubeadm-aio-node
tags:
- deploy-kubeadm-aio-node
- deploy-kubeadm-aio-node

View File

@ -15,4 +15,4 @@
- name: Execute a Whitespace Linter check
command: find . -not -path "*/\.*" -not -path "*/doc/build/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \;
register: result
failed_when: result.stdout != ""
failed_when: result.stdout != ""

11
tox.ini
View File

@ -14,8 +14,15 @@ passenv = *_proxy *_PROXY
commands = {posargs}
[testenv:lint]
deps = yamllint
deps =
yq
yamllint
commands =
bash -c "yamllint -c {toxinidir}/yamllint.conf */values* yamllint.conf"
rm -rf .yamllint
bash -c 'if [ ! -d ../openstack-helm-infra ]; then\
git clone https://opendev.org/openstack/openstack-helm-infra ../openstack-helm-infra;\
fi'
bash ../openstack-helm-infra/tools/gate/lint.sh
whitelist_externals =
rm
bash

32
yamllint-templates.conf Normal file
View File

@ -0,0 +1,32 @@
---
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'
rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments: enable
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines: disable
empty-values: disable
hyphens: enable
indentation:
spaces: 2
indent-sequences: whatever
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: disable
new-lines: disable
octal-values: disable
quoted-strings: disable
trailing-spaces: disable
truthy: disable
...

View File

@ -12,13 +12,11 @@ rules:
commas: enable
comments: enable
comments-indentation: enable
document-end: enable
document-start: enable
document-end: disable
document-start: disable
empty-lines: enable
empty-values:
level: warning
hyphens:
level: warning
empty-values: disable
hyphens: enable
indentation:
spaces: 2
indent-sequences: whatever
@ -27,9 +25,8 @@ rules:
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
truthy: disable
...

View File

@ -158,4 +158,4 @@
- ./tools/deployment/common/install-packages.sh
- ./tools/deployment/common/deploy-k8s.sh
- ./tools/deployment/common/setup-client.sh
- ./tools/deployment/component/mini-mirror/mini-mirror.sh
- ./tools/deployment/component/mini-mirror/mini-mirror.sh