mirror of https://github.com/ansible/ansible.git
(cherry picked from commit 39ef570e16
)
pull/81415/head
parent
dd45caa7a9
commit
2d4d354cb1
@ -1,137 +0,0 @@
|
|||||||
automerge: false
|
|
||||||
collection_redirect: true
|
|
||||||
notifications: false
|
|
||||||
files:
|
|
||||||
$module_utils/csharp: &id001
|
|
||||||
labels: windows
|
|
||||||
maintainers: $team_windows_core
|
|
||||||
support: core
|
|
||||||
$module_utils/network:
|
|
||||||
labels: networking
|
|
||||||
$module_utils/network/common:
|
|
||||||
maintainers: $team_networking
|
|
||||||
support: network
|
|
||||||
$module_utils/powershell: *id001
|
|
||||||
$modules:
|
|
||||||
ignored: ryansb tomaszkiewicz
|
|
||||||
$modules/lineinfile.py: $team_ansible samdoran
|
|
||||||
$modules/stat.py:
|
|
||||||
ignored: bpennypacker
|
|
||||||
$modules/unarchive.py:
|
|
||||||
ignored: dagwieers
|
|
||||||
labels: m:unarchive
|
|
||||||
maintainers: pileofrogs
|
|
||||||
$modules/add_host.py:
|
|
||||||
ignored: skvidal
|
|
||||||
maintainers: $team_ansible
|
|
||||||
$modules/get_url.py: ptux
|
|
||||||
$modules/uri.py:
|
|
||||||
ignored: romeotheriault
|
|
||||||
maintainers: $team_ansible
|
|
||||||
$modules/pip.py: Lujeni webknjaz
|
|
||||||
$modules//yum.py:
|
|
||||||
ignored: skvidal
|
|
||||||
maintainers: $team_ansible kustodian
|
|
||||||
$modules/user.py: $team_ansible samdoran
|
|
||||||
$modules/pause.py: samdoran
|
|
||||||
$modules/wait_for.py: gregswift
|
|
||||||
$plugins/cliconf/:
|
|
||||||
labels: networking
|
|
||||||
$plugins/connection/psrp.py: *id001
|
|
||||||
$plugins/connection/winrm.py: *id001
|
|
||||||
$plugins/doc_fragments/url_windows.py:
|
|
||||||
labels: windows
|
|
||||||
maintainers: $team_windows_core
|
|
||||||
support: core
|
|
||||||
$plugins/httpapi:
|
|
||||||
labels: networking
|
|
||||||
maintainers: $team_networking
|
|
||||||
support: network
|
|
||||||
$plugins/netconf/:
|
|
||||||
labels: networking
|
|
||||||
maintainers: $team_networking
|
|
||||||
support: network
|
|
||||||
$plugins/shell/powershell.py: *id001
|
|
||||||
$plugins/terminal/:
|
|
||||||
labels: networking
|
|
||||||
$plugins/terminal/__init__.py:
|
|
||||||
support: network
|
|
||||||
.github/BOTMETA.yml:
|
|
||||||
labels: botmeta
|
|
||||||
support: core
|
|
||||||
hacking/report.py:
|
|
||||||
notified: mattclay
|
|
||||||
hacking/shippable/:
|
|
||||||
notified: mattclay
|
|
||||||
lib/ansible/cli/scripts/ansible_connection_cli_stub.py:
|
|
||||||
keywords:
|
|
||||||
- persistent connection
|
|
||||||
labels: networking
|
|
||||||
lib/ansible/config/ansible_builtin_runtime.yml:
|
|
||||||
labels: runtime
|
|
||||||
maintainers: gundalow
|
|
||||||
lib/ansible/executor/powershell: *id001
|
|
||||||
lib/ansible/inventory:
|
|
||||||
keywords:
|
|
||||||
- core inventory
|
|
||||||
- inventory
|
|
||||||
- inventory parsing
|
|
||||||
lib/ansible/playbook/handler.py:
|
|
||||||
keywords:
|
|
||||||
- handlers
|
|
||||||
lib/ansible/playbook/role:
|
|
||||||
keywords:
|
|
||||||
- roles path
|
|
||||||
- roles_path
|
|
||||||
- role
|
|
||||||
- role path
|
|
||||||
lib/ansible/playbook/role/include.py:
|
|
||||||
keywords:
|
|
||||||
- include role
|
|
||||||
- include_role
|
|
||||||
- role include
|
|
||||||
lib/ansible/playbook/role/requirement.py:
|
|
||||||
keywords:
|
|
||||||
- role dependencies
|
|
||||||
- role dep
|
|
||||||
- role dependency
|
|
||||||
lib/ansible/release.py:
|
|
||||||
notified: mattclay nitzmahone
|
|
||||||
lib/ansible/template:
|
|
||||||
keywords:
|
|
||||||
- jinja
|
|
||||||
- jinja2
|
|
||||||
lib/ansible/utils/collection_loader.py:
|
|
||||||
notified: mattclay nitzmahone
|
|
||||||
test/integration/targets/incidental_:
|
|
||||||
notified: mattclay
|
|
||||||
test/lib/:
|
|
||||||
notified: mattclay
|
|
||||||
test/lib/ansible_test/_util/controller/sanity/validate-modules:
|
|
||||||
keywords:
|
|
||||||
- validate-modules
|
|
||||||
notified:
|
|
||||||
- mattclay
|
|
||||||
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py:
|
|
||||||
notified:
|
|
||||||
- gundalow
|
|
||||||
- sivel
|
|
||||||
test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py:
|
|
||||||
notified:
|
|
||||||
- gundalow
|
|
||||||
- sivel
|
|
||||||
test/sanity/:
|
|
||||||
notified: mattclay
|
|
||||||
test/sanity/ignore.txt:
|
|
||||||
notified: tremble
|
|
||||||
test/support/:
|
|
||||||
notified: mattclay
|
|
||||||
test/utils/shippable/:
|
|
||||||
notified: mattclay
|
|
||||||
macros:
|
|
||||||
module_utils: lib/ansible/module_utils
|
|
||||||
modules: lib/ansible/modules
|
|
||||||
plugins: lib/ansible/plugins
|
|
||||||
team_ansible: []
|
|
||||||
team_networking: Qalthos ganeshrn trishnaguha justjais NilashishC danielmellado rohitthakur2590 GomathiselviS
|
|
||||||
team_windows_core: nitzmahone jborean93
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"no_targets": true,
|
|
||||||
"output": "path-line-column-message"
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
"""Make sure the data in BOTMETA.yml is valid"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import glob
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
from voluptuous import All, Any, Match, MultipleInvalid, Required, Schema
|
|
||||||
from voluptuous.humanize import humanize_error
|
|
||||||
|
|
||||||
from ansible.module_utils.six import string_types
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
"""Validate BOTMETA"""
|
|
||||||
path = '.github/BOTMETA.yml'
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open(path, 'r') as f_path:
|
|
||||||
botmeta = yaml.safe_load(f_path)
|
|
||||||
except yaml.error.MarkedYAMLError as ex:
|
|
||||||
print('%s:%d:%d: YAML load failed: %s' % (path, ex.context_mark.line + 1, ex.context_mark.column + 1, re.sub(r'\s+', ' ', str(ex))))
|
|
||||||
sys.exit()
|
|
||||||
except Exception as ex: # pylint: disable=broad-except
|
|
||||||
print('%s:%d:%d: YAML load failed: %s' % (path, 0, 0, re.sub(r'\s+', ' ', str(ex))))
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
list_string_types = list(string_types)
|
|
||||||
|
|
||||||
files_schema = Any(
|
|
||||||
Schema(*string_types),
|
|
||||||
Schema({
|
|
||||||
'ignored': Any(list_string_types, *string_types),
|
|
||||||
'keywords': Any(list_string_types, *string_types),
|
|
||||||
'labels': Any(list_string_types, *string_types),
|
|
||||||
'maintainers': Any(list_string_types, *string_types),
|
|
||||||
'migrated_to': All(
|
|
||||||
Any(*string_types),
|
|
||||||
Match(r'^\w+\.\w+$'),
|
|
||||||
),
|
|
||||||
'notified': Any(list_string_types, *string_types),
|
|
||||||
'supershipit': Any(list_string_types, *string_types),
|
|
||||||
'support': Any("core", "network", "community"),
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
list_dict_file_schema = [{str_type: files_schema}
|
|
||||||
for str_type in string_types]
|
|
||||||
|
|
||||||
schema = Schema({
|
|
||||||
Required('automerge'): bool,
|
|
||||||
Required('collection_redirect'): bool,
|
|
||||||
Required('notifications'): bool,
|
|
||||||
Required('files'): Any(None, *list_dict_file_schema),
|
|
||||||
Required('macros'): dict, # Any(*list_macros_schema),
|
|
||||||
})
|
|
||||||
|
|
||||||
# Ensure schema is valid
|
|
||||||
|
|
||||||
try:
|
|
||||||
schema(botmeta)
|
|
||||||
except MultipleInvalid as ex:
|
|
||||||
for error in ex.errors:
|
|
||||||
# No way to get line numbers
|
|
||||||
print('%s:%d:%d: %s' % (path, 0, 0, humanize_error(botmeta, error)))
|
|
||||||
|
|
||||||
# Ensure botmeta is always support:core
|
|
||||||
botmeta_support = botmeta.get('files', {}).get('.github/BOTMETA.yml', {}).get('support', '')
|
|
||||||
if botmeta_support != 'core':
|
|
||||||
print('%s:%d:%d: .github/BOTMETA.yml MUST be support: core' % (path, 0, 0))
|
|
||||||
|
|
||||||
# Find all path (none-team) macros so we can substitute them
|
|
||||||
macros = botmeta.get('macros', {})
|
|
||||||
path_macros = []
|
|
||||||
for macro in macros:
|
|
||||||
if macro.startswith('team_'):
|
|
||||||
continue
|
|
||||||
path_macros.append(macro)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
|
|
||||||
# Possible future work
|
|
||||||
# * Schema for `macros:` - currently ignored due to team_ansible
|
|
||||||
# * Ensure that all $teams mention in `files:` exist in `$macros`
|
|
||||||
# * Validate GitHub names - possibly expensive lookup needed - No should be validated when module is added - gundalow
|
|
@ -1,2 +0,0 @@
|
|||||||
pyyaml
|
|
||||||
voluptuous
|
|
@ -1,5 +0,0 @@
|
|||||||
# edit "botmeta.requirements.in" and generate with: hacking/update-sanity-requirements.py --test botmeta
|
|
||||||
# pre-build requirement: pyyaml == 6.0
|
|
||||||
# pre-build constraint: Cython < 3.0
|
|
||||||
PyYAML==6.0
|
|
||||||
voluptuous==0.13.1
|
|
Loading…
Reference in New Issue