Merge "Enable yamllint"

This commit is contained in:
Zuul 2020-05-05 08:46:58 +00:00 committed by Gerrit Code Review
commit ff77dd22a1
13 changed files with 38 additions and 20 deletions

20
.yamllint Normal file
View File

@ -0,0 +1,20 @@
extends: default
ignore: |
.tox
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
comments-indentation: disable
document-start: disable
empty-lines:
max: 1
max-end: 2
indentation: disable
new-line-at-end-of-file: disable
line-length: disable
truthy: false

View File

@ -9,7 +9,6 @@
return_content: true return_content: true
register: go_archive_checksum register: go_archive_checksum
- name: Download go archive - name: Download go archive
get_url: get_url:
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz" url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"

View File

@ -48,7 +48,6 @@
loop_var: zj_pdf loop_var: zj_pdf
when: zj_pdf.stat.exists when: zj_pdf.stat.exists
- name: Return PDF artifact to Zuul - name: Return PDF artifact to Zuul
zuul_return: zuul_return:
data: data:

View File

@ -14,7 +14,7 @@
{{ packer_variables | to_json }} {{ packer_variables | to_json }}
dest: "{{ packer_variable_tempfile.path }}" dest: "{{ packer_variable_tempfile.path }}"
when: packer_variables is defined when: packer_variables is defined
no_log: true # We don't want to log this since credentials could be passed this way no_log: true # We don't want to log this since credentials could be passed this way
- block: - block:
- name: Run packer - name: Run packer

View File

@ -15,6 +15,6 @@
uri: uri:
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/" url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/"
method: DELETE method: DELETE
status_code: [200,204] status_code: [200, 204]
headers: headers:
Authorization: "JWT {{ jwt_token.json.token }}" Authorization: "JWT {{ jwt_token.json.token }}"

View File

@ -23,6 +23,6 @@
uri: uri:
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/" url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/"
method: DELETE method: DELETE
status_code: [200,204] status_code: [200, 204]
headers: headers:
Authorization: "JWT {{ jwt_token.json.token }}" Authorization: "JWT {{ jwt_token.json.token }}"

View File

@ -1,11 +1,12 @@
--- ---
workdir: . workdir: .
output: | output: "\
tests/__init__.py:2808:8: E1120: No value for argument 'get_storage_profile_id' in method call (no-value-for-parameter) tests/__init__.py:2808:8: E1120: \e[1;31mNo value for argument 'get_storage_profile_id' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
tests/__init__.py:2808:8: E1120: No value for argument 'select_ds_for_volume' in method call (no-value-for-parameter) tests/__init__.py:2808:8: E1120: \e[1;31mNo value for argument 'select_ds_for_volume' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
tests/__init__.py:2812:8: E1120: No value for argument 'get_adapter_type' in method call (no-value-for-parameter) tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'get_adapter_type' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
tests/__init__.py:2812:8: E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter) tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'get_disk_type' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
tests/__init__.py:2812:8: E1120: No value for argument 'vops' in method call (no-value-for-parameter) tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'vops' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
"
comments: comments:
tests/__init__.py: tests/__init__.py:
- line: 2808 - line: 2808
@ -18,4 +19,3 @@ comments:
message: "E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter)" message: "E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter)"
- line: 2812 - line: 2812
message: "E1120: No value for argument 'vops' in method call (no-value-for-parameter)" message: "E1120: No value for argument 'vops' in method call (no-value-for-parameter)"

View File

@ -1,4 +1,4 @@
zuul_site_image_manifest_files: zuul_site_image_manifest_files:
- /etc/dib-builddate.txt - /etc/dib-builddate.txt
- /etc/image-hostname.txt - /etc/image-hostname.txt
validate_host_hostname: "{{ inventory_hostname }}" validate_host_hostname: "{{ inventory_hostname }}"

View File

@ -84,7 +84,6 @@
fi fi
exit $GLOBAL_RESULT exit $GLOBAL_RESULT
# The following test(s) require(s) the previous playbook # The following test(s) require(s) the previous playbook
- name: Run the fetch-subunit-output role with multiple subunits - name: Run the fetch-subunit-output role with multiple subunits
hosts: all hosts: all

View File

@ -42,9 +42,9 @@
# has already installed from source. We might be able to test this # has already installed from source. We might be able to test this
# once it's gone... # once it's gone...
#- hosts: all # - hosts: all
# roles: # roles:
# - role: ensure-pip # - role: ensure-pip
# vars: # vars:
# ensure_pip_from_upstream: True # ensure_pip_from_upstream: True

View File

@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
flake8 flake8
yamllint>=1.23.0
# We need to pin the ansible version directly here; per the # We need to pin the ansible version directly here; per the
# deprecation policy it should trail the version used by Zuul by 4 # deprecation policy it should trail the version used by Zuul by 4

View File

@ -39,6 +39,7 @@ setenv =
whitelist_externals = bash whitelist_externals = bash
commands = commands =
flake8 {posargs} flake8 {posargs}
yamllint -s -f parsable .
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \ bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \
xargs -t -0 ansible-lint" xargs -t -0 ansible-lint"
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \ bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \

View File

@ -230,7 +230,6 @@
The version of Node to use. The version of Node to use.
.. zuul:jobvar:: javascript_content_dir .. zuul:jobvar:: javascript_content_dir
:default: dist :default: dist