mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user