diff --git a/build.gradle b/build.gradle index b51bafda11f..64c8bd201e1 100644 --- a/build.gradle +++ b/build.gradle @@ -7,16 +7,22 @@ import org.elasticsearch.gradle.VersionProperties import org.elastic.gradle.UploadS3Task String envAwsAccessKey = System.env.AWS_ACCESS_KEY_ID +print 'BUILD - System.env.AWS_ACCESS_KEY_ID: ' + envAwsAccessKey + '\n' if (envAwsAccessKey != null) { + print 'using access key from System.env.AWS_ACCESS_KEY_ID: ' + envAwsAccessKey + '\n' project.ext.awsAccessKey = envAwsAccessKey } else if (project.hasProperty("AWS_ACCESS_KEY_ID")) { + print 'using access key from gradle.properties: ' + AWS_ACCESS_KEY_ID + '\n' project.ext.awsAccessKey = AWS_ACCESS_KEY_ID } String envAwsSecretKey = System.env.AWS_SECRET_ACCESS_KEY +print 'BUILD - System.env.AWS_SECRET_ACCESS_KEY: ' + envAwsSecretKey + '\n' if (envAwsSecretKey != null) { + print 'using access key from System.env.AWS_SECRET_ACCESS_KEY: ' + envAwsSecretKey + '\n' project.ext.awsSecretKey = envAwsSecretKey } else if (project.hasProperty("AWS_SECRET_ACCESS_KEY")) { + print 'using secret key from gradle.properties: ' + AWS_SECRET_ACCESS_KEY + '\n' project.ext.awsSecretKey = AWS_SECRET_ACCESS_KEY } diff --git a/buildSrc/src/main/groovy/org/elastic/gradle/DownloadS3Task.groovy b/buildSrc/src/main/groovy/org/elastic/gradle/DownloadS3Task.groovy index 7f4c1e997e3..11f04d66836 100644 --- a/buildSrc/src/main/groovy/org/elastic/gradle/DownloadS3Task.groovy +++ b/buildSrc/src/main/groovy/org/elastic/gradle/DownloadS3Task.groovy @@ -51,8 +51,8 @@ class DownloadS3Task extends DefaultTask { @TaskAction public void downloadFromS3() { - print 'DownloadS3Task - AWS ACCESS KEY ID: ' + project.awsAccessKey - print 'DownloadS3Task - AWS SECRET ACCESS KEY: ' + project.awsSecretKey + print 'DownloadS3Task - AWS ACCESS KEY ID: ' + project.awsAccessKey + '\n' + print 'DownloadS3Task - AWS SECRET ACCESS KEY: ' + project.awsSecretKey + '\n' AWSCredentials creds = new BasicAWSCredentials(project.awsAccessKey, project.awsSecretKey) ClientConfiguration clientConfiguration = new ClientConfiguration();