File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,15 @@ upload := {
23
23
import com .amazonaws .auth .DefaultAWSCredentialsProviderChain
24
24
import com .amazonaws .services .s3 .AmazonS3ClientBuilder
25
25
import com .amazonaws .services .s3 .model .{CannedAccessControlList , PutObjectRequest }
26
+ import com .amazonaws .regions .Regions
26
27
27
28
// the publishing job runs on an EC2 instance that has access to the S3 bucket via its IAM instance profile
28
- val client = AmazonS3ClientBuilder .defaultClient
29
+ val client = AmazonS3ClientBuilder .standard.withRegion( Regions . US_EAST_1 ).build
29
30
30
31
val log = streams.value.log
31
32
32
33
(mappings in upload).value map { case (file, key) =>
33
- log.debug (" Uploading " + file.getAbsolutePath() + " as " + key)
34
+ log.info (" Uploading " + file.getAbsolutePath() + " as " + key)
34
35
35
36
// since the s3 bucket is in a separate account from where the EC2 CI instances are, must explicitly set acl as public-read
36
37
client.putObject(new PutObjectRequest (" downloads.typesafe.com" , key, file).withCannedAcl(CannedAccessControlList .PublicRead ))
You can’t perform that action at this time.
0 commit comments