From 6e6825e79fb363cb77088c68f4758e4df0048409 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Thu, 20 Sep 2018 10:56:56 +1000 Subject: [PATCH] append AWS region to test instance file (#45877) (cherry picked from commit 582a4dfa13fd1ebca9132892de79d8ea5866ae91) --- test/runner/lib/core_ci.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/runner/lib/core_ci.py b/test/runner/lib/core_ci.py index a273d8a6de1a11..127ee69c88f832 100644 --- a/test/runner/lib/core_ci.py +++ b/test/runner/lib/core_ci.py @@ -95,6 +95,8 @@ def __init__(self, args, platform, version, stage='prod', persist=True, load=Tru self.provider = candidate break + self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage)) + if self.provider in ('aws', 'azure'): if self.provider != 'aws': self.resource = self.provider @@ -114,6 +116,7 @@ def __init__(self, args, platform, version, stage='prod', persist=True, load=Tru # send all non-Shippable jobs to us-east-1 to reduce api key maintenance region = 'us-east-1' + self.path = "%s-%s" % (self.path, region) self.endpoints = AWS_ENDPOINTS[region], self.ssh_key = SshKey(args) @@ -130,8 +133,6 @@ def __init__(self, args, platform, version, stage='prod', persist=True, load=Tru else: raise ApplicationError('Unsupported platform: %s' % platform) - self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage)) - if persist and load and self._load(): try: display.info('Checking existing %s/%s instance %s.' % (self.platform, self.version, self.instance_id),