mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
[PR #10279/7e66fb05 backport][stable-11] CI: Add yamllint for YAML files, plugin/module docs, and YAML in extra docs (#10317)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
CI: Add yamllint for YAML files, plugin/module docs, and YAML in extra docs (#10279)
* Add yamllint to CI.
* Fix more YAML booleans.
(cherry picked from commit 7e66fb052e
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
a3e07bd083
commit
d7c5b35b32
5 changed files with 74 additions and 11 deletions
52
.yamllint
Normal file
52
.yamllint
Normal file
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
extends: default
|
||||
|
||||
ignore: |
|
||||
/changelogs/
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 1000
|
||||
level: error
|
||||
document-start: disable
|
||||
document-end: disable
|
||||
truthy:
|
||||
level: error
|
||||
allowed-values:
|
||||
- 'true'
|
||||
- 'false'
|
||||
indentation:
|
||||
spaces: 2
|
||||
indent-sequences: true
|
||||
key-duplicates: enable
|
||||
trailing-spaces: enable
|
||||
new-line-at-end-of-file: disable
|
||||
hyphens:
|
||||
max-spaces-after: 1
|
||||
empty-lines:
|
||||
max: 2
|
||||
max-start: 0
|
||||
max-end: 0
|
||||
commas:
|
||||
max-spaces-before: 0
|
||||
min-spaces-after: 1
|
||||
max-spaces-after: 1
|
||||
colons:
|
||||
max-spaces-before: 0
|
||||
max-spaces-after: 1
|
||||
brackets:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
braces:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
||||
forbid-explicit-octal: true
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: false
|
|
@ -14,6 +14,17 @@
|
|||
|
||||
[sessions]
|
||||
|
||||
[sessions.lint]
|
||||
run_isort = false
|
||||
run_black = false
|
||||
run_flake8 = false
|
||||
run_pylint = false
|
||||
run_yamllint = true
|
||||
yamllint_config = ".yamllint"
|
||||
# yamllint_config_plugins = ".yamllint-docs"
|
||||
# yamllint_config_plugins_examples = ".yamllint-examples"
|
||||
run_mypy = false
|
||||
|
||||
[sessions.docs_check]
|
||||
validate_collection_refs="all"
|
||||
codeblocks_restrict_types = [
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
jenkins_user: "{{ jenkins_username }}"
|
||||
jenkins_password: "{{ jenkins_password }}"
|
||||
type: "token"
|
||||
force: yes
|
||||
force: true
|
||||
register: token_result
|
||||
|
||||
- name: Set token in vars
|
||||
|
@ -45,7 +45,7 @@
|
|||
exc_hostname_port:
|
||||
- "new_excluded-hostname:7000"
|
||||
- "new_excluded-hostname2:7000"
|
||||
force: yes
|
||||
force: true
|
||||
register: custom_scope
|
||||
|
||||
- name: Assert CUSTOM scope changed value
|
||||
|
@ -64,7 +64,7 @@
|
|||
description: "new user and password credential"
|
||||
username: "user2"
|
||||
password: "pass2"
|
||||
force: yes
|
||||
force: true
|
||||
register: userpass_cred
|
||||
|
||||
- name: Assert user_and_pass changed value
|
||||
|
@ -83,7 +83,7 @@
|
|||
scope: "CUSTOM"
|
||||
description: "New file credential"
|
||||
file_path: "{{ output_dir }}/my-secret.pem"
|
||||
force: yes
|
||||
force: true
|
||||
register: file_cred
|
||||
|
||||
- name: Assert file credential changed value
|
||||
|
@ -103,7 +103,7 @@
|
|||
secret: "mynewsecrettext"
|
||||
location: "folder"
|
||||
url: "http://localhost:8080/job/test"
|
||||
force: yes
|
||||
force: true
|
||||
register: text_cred
|
||||
|
||||
- name: Assert text credential changed value
|
||||
|
@ -123,7 +123,7 @@
|
|||
appID: "12345678"
|
||||
private_key_path: "{{ output_dir }}/github.pem"
|
||||
owner: "new_github_owner"
|
||||
force: yes
|
||||
force: true
|
||||
register: githubapp_cred
|
||||
|
||||
- name: Assert githubApp credential changed value
|
||||
|
@ -143,7 +143,7 @@
|
|||
username: "new_sshuser"
|
||||
private_key_path: "{{ output_dir }}/ssh_key"
|
||||
passphrase: 1234
|
||||
force: yes
|
||||
force: true
|
||||
register: sshkey_cred
|
||||
|
||||
- name: Assert sshKey credential changed value
|
||||
|
@ -162,7 +162,7 @@
|
|||
description: "New certificate credential"
|
||||
password: "12345678901234"
|
||||
file_path: "{{ output_dir }}/certificate.p12"
|
||||
force: yes
|
||||
force: true
|
||||
register: cert_p12_cred
|
||||
|
||||
- name: Assert certificate (p12) credential changed value
|
||||
|
@ -181,7 +181,7 @@
|
|||
description: "New certificate credential (pem)"
|
||||
file_path: "{{ output_dir }}/cert.pem"
|
||||
private_key_path: "{{ output_dir }}/private.key"
|
||||
force: yes
|
||||
force: true
|
||||
register: cert_pem_cred
|
||||
|
||||
- name: Assert certificate (pem) credential changed value
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
jenkins_user: "{{ jenkins_username }}"
|
||||
jenkins_password: "{{ jenkins_password }}"
|
||||
type: "token"
|
||||
no_log: yes
|
||||
no_log: true
|
||||
register: token_result
|
||||
|
||||
- name: Assert token and tokenUuid are returned
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
uri:
|
||||
url: http://localhost:8080/login
|
||||
status_code: 200
|
||||
return_content: no
|
||||
return_content: false
|
||||
timeout: 30
|
||||
register: result
|
||||
retries: 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue