summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Lukjanov <slukjanov@mirantis.com>2016-09-16 19:47:53 -0700
committerSergey Lukjanov <slukjanov@mirantis.com>2016-09-16 19:56:16 -0700
commit7d633af3ab0fd12fb2608cccf2c2ed959a8fc7c9 (patch)
tree73422d3f0757d7117903aee93b28681367a049a8
parentb5985cec79f313d0d9beb99cf95248a6e3476fdc (diff)
Yaml linter execution and config improved0.1.0
Notes
Notes (review): Verified+1: Mirantis CCP CI <mirantis-fuel-ccp-ci@mirantis.com> Code-Review+2: Aleksandr Mogylchenko <amogylchenko@mirantis.com> Code-Review+2: Proskurin Kirill <kproskurin@mirantis.com> Workflow+1: Proskurin Kirill <kproskurin@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sat, 17 Sep 2016 09:00:32 +0000 Reviewed-on: https://review.openstack.org/371880 Project: openstack/fuel-ccp-rabbitmq Branch: refs/heads/master
-rw-r--r--service/rabbitmq.yaml8
-rwxr-xr-xtools/run-check-yaml-syntax.sh7
-rwxr-xr-xtools/yamllint.sh5
-rw-r--r--tools/yamllint.yaml21
-rw-r--r--tox.ini2
5 files changed, 31 insertions, 12 deletions
diff --git a/service/rabbitmq.yaml b/service/rabbitmq.yaml
index a57acfa..010165e 100644
--- a/service/rabbitmq.yaml
+++ b/service/rabbitmq.yaml
@@ -9,10 +9,10 @@ service:
9 readiness: "true" 9 readiness: "true"
10 liveness: "true" 10 liveness: "true"
11 volumes: 11 volumes:
12 - name: rabbitmq-logs 12 - name: rabbitmq-logs
13 path: "/var/log/ccp/rabbitmq" 13 path: "/var/log/ccp/rabbitmq"
14 type: host 14 type: host
15 readOnly: False 15 readOnly: False
16 pre: 16 pre:
17 - name: chown-logs-dir 17 - name: chown-logs-dir
18 command: "sudo /bin/chown rabbitmq: /var/log/ccp/rabbitmq" 18 command: "sudo /bin/chown rabbitmq: /var/log/ccp/rabbitmq"
diff --git a/tools/run-check-yaml-syntax.sh b/tools/run-check-yaml-syntax.sh
deleted file mode 100755
index e393c54..0000000
--- a/tools/run-check-yaml-syntax.sh
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/bash
2
3### Temp yaml syntax checker script.
4set -e
5for file in $(find . -name '*.yaml'); do
6 yamllint -d relaxed $file
7done
diff --git a/tools/yamllint.sh b/tools/yamllint.sh
new file mode 100755
index 0000000..6e84445
--- /dev/null
+++ b/tools/yamllint.sh
@@ -0,0 +1,5 @@
1#!/bin/bash
2set -ex
3
4workdir=$(dirname $0)
5yamllint -c $workdir/yamllint.yaml $(find . -not -path '*/\.*' -type f -name '*.yaml')
diff --git a/tools/yamllint.yaml b/tools/yamllint.yaml
new file mode 100644
index 0000000..6c2e4a7
--- /dev/null
+++ b/tools/yamllint.yaml
@@ -0,0 +1,21 @@
1extends: default
2
3rules:
4 braces:
5 max-spaces-inside: 1
6 comments:
7 level: error
8 comments-indentation:
9 level: warning
10 document-end:
11 present: no
12 document-start:
13 level: error
14 present: no
15 empty-lines:
16 max: 1
17 max-start: 0
18 max-end: 0
19 line-length:
20 level: warning
21 max: 120
diff --git a/tox.ini b/tox.ini
index 7efb0df..b58791b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,7 +6,7 @@ skipsdist = True
6[testenv:linters] 6[testenv:linters]
7deps = yamllint 7deps = yamllint
8commands = 8commands =
9 {toxinidir}/tools/run-check-yaml-syntax.sh 9 {toxinidir}/tools/yamllint.sh
10 10
11[testenv:bashate] 11[testenv:bashate]
12deps = bashate>=0.2 12deps = bashate>=0.2