Browse code

Fix YAML source and check it on Shippable (#15678)

Fix YAML source and check it on Shippable

Adrien Vergé authored on 2016/06/05 02:58:17
Showing 5 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+extends: default
1
+
2
+# Disable all cosmetic rules
3
+# (see https://github.com/ansible/ansible/pull/15470#issuecomment-214437876)
4
+# Only keep 'key-duplicates' and 'new-lines: {type: unix}' checks enabled.
5
+
6
+rules:
7
+  braces: disable
8
+  brackets: disable
9
+  colons: disable
10
+  commas: disable
11
+  comments: disable
12
+  comments-indentation: disable
13
+  document-start: disable
14
+  empty-lines: disable
15
+  hyphens: disable
16
+  indentation: disable
17
+  key-duplicates: enable
18
+  line-length: disable
19
+  new-line-at-end-of-file: disable
20
+  new-lines: {type: unix}
21
+  trailing-spaces: disable
... ...
@@ -2,7 +2,7 @@ language: python
2 2
 
3 3
 env:
4 4
   matrix:
5
-    - TEST=code-smell
5
+    - TEST=code-smell INSTALL_DEPS=1
6 6
 
7 7
 matrix:
8 8
   include:
... ...
@@ -192,7 +192,6 @@
192 192
     volume: 3
193 193
     wait: true
194 194
     wait_timeout: "{{ rackspace_wait_timeout }}"
195
-    wait_timeout: 600
196 195
   register: rax_cdb
197 196
 
198 197
 - name: Validate rax_cdb resize volume 2
... ...
@@ -251,7 +250,6 @@
251 251
     flavor: 2
252 252
     wait: true
253 253
     wait_timeout: "{{ rackspace_wait_timeout }}"
254
-    wait_timeout: 600
255 254
   register: rax_cdb
256 255
 
257 256
 - name: Validate rax_cdb resize flavor 2
... ...
@@ -25,7 +25,6 @@
25 25
             - '"val1" in test_env2.stdout_lines'
26 26
 
27 27
 - hosts: testhost
28
-  tasks:
29 28
   vars:
30 29
     - test1:
31 30
         key1: val1
... ...
@@ -2,8 +2,15 @@
2 2
 
3 3
 source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))")
4 4
 
5
+install_deps="${INSTALL_DEPS:-}"
6
+
5 7
 cd "${source_root}"
6 8
 
9
+if [ "${install_deps}" != "" ]; then
10
+    pip install yamllint
11
+fi
12
+
13
+yamllint .
7 14
 test/code-smell/replace-urlopen.sh .
8 15
 test/code-smell/use-compat-six.sh lib
9 16
 test/code-smell/boilerplate.sh