Skip to content

Commit

Permalink
append AWS region to test instance file (ansible#45877)
Browse files Browse the repository at this point in the history
(cherry picked from commit 582a4df)
  • Loading branch information
jborean93 authored and abadger committed Sep 20, 2018
1 parent 0c81145 commit 6e6825e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/runner/lib/core_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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),
Expand Down

0 comments on commit 6e6825e

Please sign in to comment.