Skip to content

Commit d232324

Browse files
committed
Added config for s3 region
1 parent 3fa54f4 commit d232324

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/travis/remote_log.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,15 @@ def write_content_for_job_id(job_id, content: '', removed_by: nil)
224224
end
225225

226226
class ArchiveClient
227-
def initialize(access_key_id: nil, secret_access_key: nil, bucket_name: nil)
227+
def initialize(access_key_id: nil, secret_access_key: nil, bucket_name: nil, region: nil)
228228
@bucket_name = bucket_name
229229
@s3 = Fog::Storage.new(
230230
aws_access_key_id: access_key_id,
231231
aws_secret_access_key: secret_access_key,
232232
provider: 'AWS',
233233
instrumentor: ActiveSupport::Notifications,
234-
connection_options: { instrumentor: ActiveSupport::Notifications }
234+
connection_options: { instrumentor: ActiveSupport::Notifications },
235+
region: region
235236
)
236237
end
237238

@@ -318,7 +319,8 @@ def initialize(platform: :default)
318319
ArchiveClient.new(
319320
access_key_id: archive_s3_config[:access_key_id],
320321
secret_access_key: archive_s3_config[:secret_access_key],
321-
bucket_name: archive_s3_config[:bucket] || archive_s3_bucket
322+
bucket_name: archive_s3_config[:bucket] || archive_s3_bucket,
323+
region: archive_s3_config[:region] || 'us-east-2'
322324
)
323325
end
324326

0 commit comments

Comments
 (0)