Skip to content

Commit dd4ca31

Browse files
authored
build: use endpoint, access/secret keys from command line. (#486)
runFunctionalTest task uses play.minio.io and its credentials by default. This patch adds support to override this by passing endpoint, access key and secret key in command line. Below is an example. ./gradlew -PendPoint=http://192.168.1.107:9000 \ -PaccessKey=minio \ -PsecretKey=minio123 \ runFunctionalTest
1 parent 4bcc9b0 commit dd4ca31

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

build.gradle

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ subprojects {
3434
apply plugin: 'findbugs'
3535

3636
group = 'io.minio'
37-
version = '2.0.5'
37+
version = '3.0'
3838
if (!project.hasProperty('release')) {
3939
version += '-DEV'
4040
}
@@ -253,7 +253,23 @@ project(':functional') {
253253
task runFunctionalTest(type:JavaExec) {
254254
main = 'FunctionalTest'
255255
classpath = sourceSets.main.runtimeClasspath
256-
args = ["https://play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"]
256+
257+
ext.endPoint = 'https://play.minio.io:9000'
258+
if (rootProject.hasProperty('endPoint')) {
259+
ext.endPoint = rootProject.properties['endPoint']
260+
}
261+
262+
ext.accessKey = 'Q3AM3UQ867SPQQA43P2F'
263+
if (project.properties.containsKey('accessKey')) {
264+
ext.accessKey = rootProject.properties['accessKey']
265+
}
266+
267+
ext.secretKey = 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG'
268+
if (project.properties.containsKey('secretKey')) {
269+
ext.secretKey = rootProject.properties['secretKey']
270+
}
271+
272+
args = [ext.endPoint, ext.accessKey, ext.secretKey]
257273
}
258274

259275
}

0 commit comments

Comments
 (0)