Skip to content

Commit 451bdff

Browse files
committed
misc: collect artifact size metrics for private repos
1 parent e263cc4 commit 451bdff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/plugins/artifactsizemetrics/CollectDelegatedArtifactSizeMetrics.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ internal abstract class CollectDelegatedArtifactSizeMetrics : DefaultTask() {
5555
prefix = pluginConfig.bucketPrefixOverride ?: "[TEMP]${pluginConfig.projectRepositoryName}-$identifier-"
5656
}.contents?.map {
5757
it.key ?: throw AwsSdkGradleException("A file from the artifact size metrics bucket is missing a key")
58+
} ?: s3.listObjects {
59+
bucket = S3_ARTIFACT_SIZE_METRICS_BUCKET
60+
prefix = pluginConfig.bucketPrefixOverride ?: "[TEMP]private-${pluginConfig.projectRepositoryName}-staging-$identifier-"
61+
}.contents?.map {
62+
it.key ?: throw AwsSdkGradleException("A file from the artifact size metrics bucket is missing a key")
5863
}
5964
}
6065
}

0 commit comments

Comments
 (0)