mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 14:59:09 -07:00
Add --remote-terminate
option to ansible-test.
Set `--remote-terminate success` for osx tests.
This commit is contained in:
parent
bb90f5d220
commit
fb9efd3c7e
4 changed files with 13 additions and 2 deletions
|
@ -245,6 +245,7 @@ def delegate_remote(args, exclude, require):
|
|||
version = parts[1]
|
||||
|
||||
core_ci = AnsibleCoreCI(args, platform, version, stage=args.remote_stage)
|
||||
success = False
|
||||
|
||||
try:
|
||||
core_ci.start()
|
||||
|
@ -277,11 +278,13 @@ def delegate_remote(args, exclude, require):
|
|||
|
||||
try:
|
||||
manage.ssh(cmd, ssh_options)
|
||||
success = True
|
||||
finally:
|
||||
manage.ssh('rm -rf /tmp/results && cp -a ansible/test/results /tmp/results')
|
||||
manage.download('/tmp/results', 'test')
|
||||
finally:
|
||||
pass
|
||||
if args.remote_terminate == 'always' or (args.remote_terminate == 'success' and success):
|
||||
core_ci.stop()
|
||||
|
||||
|
||||
def generate_command(args, path, options, exclude, require):
|
||||
|
|
|
@ -467,6 +467,7 @@ class EnvironmentConfig(CommonConfig):
|
|||
|
||||
self.remote_stage = args.remote_stage # type: str
|
||||
self.remote_aws_region = args.remote_aws_region # type: str
|
||||
self.remote_terminate = args.remote_terminate # type: str
|
||||
|
||||
self.requirements = args.requirements # type: bool
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue