You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2018/02/26 23:01:19 UTC

[incubator-openwhisk-runtime-swift] branch master updated (b320f30 -> eb5ddf0)

This is an automated email from the ASF dual-hosted git repository.

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


    from b320f30  Update changelogs (#25)
     new 22a2e27  Switch to Maven based dependency
     new eb5ddf0  update readme with maven install command

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md             | 33 ++++++++++++++++++++++++++++++++-
 settings.gradle       | 12 ++++--------
 tests/build.gradle    |  7 +++----
 tools/travis/build.sh | 23 ++++++++++++-----------
 4 files changed, 51 insertions(+), 24 deletions(-)

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

[incubator-openwhisk-runtime-swift] 01/02: Switch to Maven based dependency

Posted by cs...@apache.org.
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-runtime-swift.git

commit 22a2e272e81bfbc7c19e7c88b8f8fb94340b445f
Author: Chetan Mehrotra <ch...@adobe.com>
AuthorDate: Thu Feb 22 18:29:11 2018 +0530

    Switch to Maven based dependency
    
    This is required for apache/incubator-openwhisk#3277
---
 settings.gradle       | 12 ++++--------
 tests/build.gradle    |  7 +++----
 tools/travis/build.sh | 23 ++++++++++++-----------
 3 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/settings.gradle b/settings.gradle
index 3ebed6d..6476232 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,11 +1,3 @@
-def owPath = System.getenv("OPENWHISK_HOME") ?: '../open'
-def owDirectory = new File(owPath)
-
-include 'common:scala'; project(':common:scala').projectDir = new File(owDirectory, 'common/scala')
-include 'core:controller'; project(':core:controller').projectDir = new File(owDirectory, 'core/controller')
-include 'core:invoker'; project(':core:invoker').projectDir = new File(owDirectory, 'core/invoker')
-include 'whisktests'; project(':whisktests').projectDir = new File(owDirectory, 'tests')
-
 include 'tests'
 
 include 'core:swift3.1.1Action'
@@ -15,6 +7,10 @@ include 'core:swift41Action'
 
 rootProject.name = 'runtime-swift'
 
+gradle.ext.openwhisk = [
+        version: '1.0.0-SNAPSHOT'
+]
+
 gradle.ext.scala = [
     version: '2.11.8',
     compileFlags: ['-feature', '-unchecked', '-deprecation', '-Xfatal-warnings', '-Ywarn-unused-import']
diff --git a/tests/build.gradle b/tests/build.gradle
index 124229c..3b60d6c 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -2,10 +2,9 @@ apply plugin: 'scala'
 apply plugin: 'eclipse'
 compileTestScala.options.encoding = 'UTF-8'
 
-evaluationDependsOn(':whisktests')
-
 repositories {
     mavenCentral()
+    mavenLocal()
 }
 
 tasks.withType(Test) {
@@ -19,8 +18,8 @@ tasks.withType(Test) {
 
 dependencies {
     compile "org.scala-lang:scala-library:${gradle.scala.version}"
-    compile project(':whisktests')
-    compile project(':whisktests').sourceSets.test.output
+    compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
+    compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
 }
 
 tasks.withType(ScalaCompile) {
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index f0aa297..7f87bbb 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -11,15 +11,6 @@ export OPENWHISK_HOME=$WHISKDIR
 
 IMAGE_PREFIX="testing"
 
-# Build runtime
-cd $ROOTDIR
-TERM=dumb ./gradlew \
-:core:swift3.1.1Action:distDocker \
-:core:swift40Action:distDocker \
-:core:swift41Action:distDocker \
--PdockerImagePrefix=${IMAGE_PREFIX}
-
-
 # Build OpenWhisk
 cd $WHISKDIR
 
@@ -31,6 +22,16 @@ docker tag openwhisk/invoker ${IMAGE_PREFIX}/invoker
 docker pull openwhisk/nodejs6action
 docker tag openwhisk/nodejs6action ${IMAGE_PREFIX}/nodejs6action
 
+TERM=dumb ./gradlew \
+:common:scala:install \
+:core:controller:install \
+:core:invoker:install \
+:tests:install
 
-
-
+# Build runtime
+cd $ROOTDIR
+TERM=dumb ./gradlew \
+:core:swift3.1.1Action:distDocker \
+:core:swift40Action:distDocker \
+:core:swift41Action:distDocker \
+-PdockerImagePrefix=${IMAGE_PREFIX}

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

[incubator-openwhisk-runtime-swift] 02/02: update readme with maven install command

Posted by cs...@apache.org.
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-runtime-swift.git

commit eb5ddf069a6fa6f2ff5f40035e2e568f8d6aae1b
Author: Carlos Santana <cs...@apache.org>
AuthorDate: Mon Feb 26 17:28:18 2018 -0500

    update readme with maven install command
---
 README.md | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 558b548..2ae5780 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ To use as a kind action
 wsk action update myAction myAction.swift --kind swift:3.1.1
 ```
 
-### Local development
+## Local development
 ```
 ./gradlew core:swiftAction:distDocker
 ```
@@ -208,6 +208,37 @@ ln -s ${ROOTDIR}/ansible/environments/local ${OPENWHISK_HOME}/ansible/environmen
 wskdev fresh -t local-swift
 ```
 
+### Testing
+Install dependencies from the root directory on $OPENWHISK_HOME repository
+```
+./gradlew :common:scala:install :core:controller:install :core:invoker:install :tests:install
+```
+
+Using gradle for the ActionContainer tests you need to use a proxy if running on Mac, if Linux then don't use proxy options
+You can pass the flags `-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128` directly in gradle command.
+Or save in your `$HOME/.gradle/gradle.properties`
+```
+systemProp.http.proxyHost=localhost
+systemProp.http.proxyPort=3128
+```
+Using gradle to run all tests
+```
+./gradlew :tests:test
+```
+Using gradle to run some tests
+```
+./gradlew :tests:test --tests *ActionContainerTests*
+```
+Using IntelliJ:
+- Import project as gradle project.
+- Make sure working directory is root of the project/repo
+- Add the following Java VM properties in ScalaTests Run Configuration, easiest is to change the Defaults for all ScalaTests to use this VM properties
+```
+-Dhttp.proxyHost=localhost
+-Dhttp.proxyPort=3128
+```
+
+#### Using container image to test
 To use as docker action push to your own dockerhub account
 ```
 docker tag whisk/action-swift-v3.1.1 $user_prefix/action-swift-v3.1.1

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