openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csantan...@apache.org
Subject [incubator-openwhisk-cli] 01/02: Fix keystore
Date Thu, 22 Feb 2018 19:59:05 GMT
This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git

commit 011fe3ddfd077bf2b6a665d9845a885b52cefeb5
Author: dubeejw <jwdubee@us.ibm.com>
AuthorDate: Wed Feb 21 01:54:39 2018 -0500

    Fix keystore
---
 settings.gradle    |  2 ++
 tests/build.gradle | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/settings.gradle b/settings.gradle
index dd36ccf..4f5a4d8 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -33,3 +33,5 @@ gradle.ext.scala = [
     version: '2.11.8',
     compileFlags: ['-feature', '-unchecked', '-deprecation', '-Xfatal-warnings', '-Ywarn-unused-import']
 ]
+
+gradle.ext.owPath = owPath
diff --git a/tests/build.gradle b/tests/build.gradle
index ec54e0f..22a54ec 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -40,3 +40,25 @@ dependencies {
 tasks.withType(ScalaCompile) {
     scalaCompileOptions.additionalParameters = gradle.scala.compileFlags
 }
+
+
+def keystorePath = new File(sourceSets.test.scala.outputDir, 'keystore')
+task deleteKeystore(type: Delete) {
+    delete keystorePath
+}
+
+task createKeystore(dependsOn: deleteKeystore) {
+    doLast {
+        Properties props = new Properties()
+        props.load(new FileInputStream(file(gradle.owPath + '/whisk.properties')))
+        keystorePath.parentFile.mkdirs()
+        def cmd = ['keytool', '-import', '-alias', 'Whisk', '-noprompt', '-trustcacerts',
'-file', file(props['whisk.ssl.cert']), '-keystore', keystorePath, '-storepass', 'openwhisk']
+        cmd.execute().waitForProcessOutput(System.out, System.err)
+    }
+}
+
+afterEvaluate {
+    tasks.withType(Test) {
+        dependsOn createKeystore
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.

Mime
View raw message