Add env command to ansible-test and run in CI. (#50176)

* Add `env` command to ansible-test and run in CI.
* Avoid unnecessary docker pull.
This commit is contained in:
Matt Clay 2018-12-20 22:08:57 -08:00 committed by GitHub
parent 4b300189fd
commit 01833b6fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 298 additions and 7 deletions

View file

@ -43,6 +43,11 @@ from lib.config import (
ShellConfig,
)
from lib.env import (
EnvConfig,
command_env,
)
from lib.sanity import (
command_sanity,
sanity_init,
@ -483,6 +488,21 @@ def parse_args():
add_extra_coverage_options(coverage_xml)
env = subparsers.add_parser('env',
parents=[common],
help='show information about the test environment')
env.set_defaults(func=command_env,
config=EnvConfig)
env.add_argument('--show',
action='store_true',
help='show environment on stdout')
env.add_argument('--dump',
action='store_true',
help='dump environment to disk')
if argcomplete:
argcomplete.autocomplete(parser, always_complete_options=False, validator=lambda i, k: True)