File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/main/kotlin/albelli/junit/synnefo/runtime Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,13 @@ import org.junit.runner.notification.Failure
8
8
import org.junit.runner.notification.RunNotifier
9
9
import software.amazon.awssdk.core.async.AsyncRequestBody
10
10
import software.amazon.awssdk.core.async.AsyncResponseTransformer
11
+ import software.amazon.awssdk.core.sync.ResponseTransformer
12
+ import software.amazon.awssdk.regions.Region
11
13
import software.amazon.awssdk.services.codebuild.CodeBuildAsyncClient
12
14
import software.amazon.awssdk.services.codebuild.model.*
13
15
import software.amazon.awssdk.services.codebuild.model.StatusType.*
14
16
import software.amazon.awssdk.services.s3.S3AsyncClient
17
+ import software.amazon.awssdk.services.s3.S3Client
15
18
import software.amazon.awssdk.services.s3.model.*
16
19
import java.io.File
17
20
import java.io.FileInputStream
@@ -139,9 +142,13 @@ class AmazonCodeBuildScheduler(private val settings: SynnefoProperties) {
139
142
.key(keyPath)
140
143
.build()!!
141
144
142
- val response = s3.getObject(getObjectRequest, AsyncResponseTransformer .toBytes()).await()
145
+ val client = S3Client
146
+ .builder()
147
+ .region(Region .EU_WEST_1 )
148
+ .build()
149
+ val response = client.getObject(getObjectRequest, ResponseTransformer .toInputStream())
143
150
144
- ZipHelper .unzip(response.asByteArray() , targetDirectory)
151
+ ZipHelper .unzip(response, targetDirectory)
145
152
}
146
153
147
154
private suspend fun uploadToS3AndGetSourcePath (job : Job , settings : SynnefoProperties ): String {
You can’t perform that action at this time.
0 commit comments