diff --git a/tools/normalize_channels_yaml.py b/tools/normalize_channels_yaml.py index df66175624..7d317907d9 100755 --- a/tools/normalize_channels_yaml.py +++ b/tools/normalize_channels_yaml.py @@ -43,6 +43,7 @@ def main(): first = False sys.stdout.write(yaml.dump({k: chandata[k]}, default_flow_style=False, Dumper=pcy.IndentedDumper, width=80, + sort_keys=False, indent=2)) if __name__ == '__main__': diff --git a/tools/projectconfig_yamllib.py b/tools/projectconfig_yamllib.py index 5095121534..2927cd4cd1 100755 --- a/tools/projectconfig_yamllib.py +++ b/tools/projectconfig_yamllib.py @@ -62,7 +62,7 @@ class IndentedDumper(IndentedEmitter, yaml.serializer.Serializer, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, - version=None, tags=None): + version=None, tags=None, sort_keys=True): IndentedEmitter.__init__( self, stream, canonical=canonical, indent=indent, width=width, @@ -75,5 +75,6 @@ class IndentedDumper(IndentedEmitter, yaml.serializer.Serializer, version=version, tags=tags) yaml.representer.Representer.__init__( self, default_style=default_style, - default_flow_style=default_flow_style) + default_flow_style=default_flow_style, + sort_keys=sort_keys) yaml.resolver.Resolver.__init__(self) diff --git a/tox.ini b/tox.ini index a328c94065..b6ef56271d 100644 --- a/tox.ini +++ b/tox.ini @@ -5,13 +5,13 @@ skipsdist = True [testenv] passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY +basepython = python3 [testenv:linters] -basepython = python3 whitelist_externals = bash setenv = - ANSIBLE_LIBRARY= {envsitepackagesdir}/zuul/ansible/library - ANSIBLE_ACTION_PLUGINS = {envsitepackagesdir}/zuul/ansible/actiongeneral + ANSIBLE_LIBRARY= {envsitepackagesdir}/zuul/ansible/base/library + ANSIBLE_ACTION_PLUGINS = {envsitepackagesdir}/zuul/ansible/base/actiongeneral # NOTE(pabelanger): if you'd like to run tox -elinters locally, # you'll need to export ANSIBLE_ROLES_PATH pointing to the required # repos. @@ -117,13 +117,11 @@ changedir = {toxinidir}/nodepool commands = env ELEMENTS_DIR=elements dib-lint [testenv:nodepool] -basepython = python3 deps = nodepool commands = {toxinidir}/tools/nodepool-validate.sh [testenv:add-projects-to-main] -basepython = python3 whitelist_externals = git deps =