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

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


The following commit(s) were added to refs/heads/master by this push:
     new b6d9599  Rdiaz82/test implementation (#7)
b6d9599 is described below

commit b6d95996f178f7b4541837a188bc33dcb100b735
Author: Roberto Diaz <[email protected]>
AuthorDate: Sun Mar 24 13:44:43 2019 +0000

    Rdiaz82/test implementation (#7)
    
    * modified the launcher to support a Hashmap as action result and some 
minor warnings removed
    
    * removed some compilation warnings
    
    * optimization in error path
    
    * test implementation
    
    * modified how to set env variables
    
    * minor changes
    
    * changes in tests
    
    * removed .travis.yml
    
    * fixed failing test
---
 .gitattributes                                     |  31 ++++
 .gitignore                                         |  36 +++++
 .scalafmt.conf                                     |   9 ++
 build.gradle                                       |  31 ++++
 gradle/README.md                                   |  64 ++++++++
 gradle/docker.gradle                               | 116 ++++++++++++++
 gradle/wrapper/gradle-wrapper.jar                  | Bin 0 -> 54708 bytes
 gradle/wrapper/gradle-wrapper.properties           |   8 +
 gradlew                                            | 172 +++++++++++++++++++++
 gradlew.bat                                        |  84 ++++++++++
 rust1.32/Dockerfile                                |   3 +-
 rust1.32/build.gradle                              |  19 +++
 rust1.32/src/action_loop/src/main.rs               |   6 +-
 settings.gradle                                    |  36 +++++
 tests/build.gradle                                 |  44 ++++++
 .../ActionLoopRustBasicTests.scala                 | 137 ++++++++++++++++
 tools/invoke.py                                    | 135 ++++++++++++++++
 rust1.32/Dockerfile => tools/travis/build.sh       |  37 +++--
 tools/travis/publish.sh                            |  64 ++++++++
 rust1.32/Dockerfile => tools/travis/setup.sh       |  28 ++--
 rust1.32/Dockerfile => tools/travis/test.sh        |  24 +--
 21 files changed, 1052 insertions(+), 32 deletions(-)

diff --git a/.gitattributes b/.gitattributes
new file mode 100755
index 0000000..b19d1c0
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,31 @@
+# Auto detect text files and perform LF normalization.
+# Resources:
+#       - https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
+#       - 
http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
+#       - https://help.github.com/articles/dealing-with-line-endings/
+* text=auto
+
+*.go            text eol=lf
+*.java          text
+*.js            text
+*.md            text
+*.py            text eol=lf
+*.scala         text
+*.sh            text eol=lf
+*.gradle        text
+*.xml           text
+*.bat           text eol=crlf
+
+*.jar           binary
+*.png           binary
+
+# python files not having the .py extension
+tools/cli/wsk      text eol=lf
+tools/cli/wskadmin text eol=lf
+
+# bash files not having the .sh extension
+tools/vagrant/simple/wsk        text eol=lf
+gradlew                         text eol=lf
+core/javaAction/proxy/gradlew   text eol=lf
+tools/vagrant/hello             text eol=lf
+sdk/docker/client/action        text eol=lf
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..514b1e1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,36 @@
+action/
+results/
+logs/
+out/
+build/
+*.retry
+
+# Linux
+*~
+
+# Mac
+.DS_Store
+
+# Gradle
+.gradle
+build/
+!/tools/build/
+
+# Python
+.ipynb_checkpoints/
+*.pyc
+
+# NodeJS
+node_modules
+
+# Vagrant
+.vagrant*
+
+# IntelliJ
+.idea
+*.class
+*.iml
+out/
+
+# .zip files must be explicited whitelisted
+*.zip
diff --git a/.scalafmt.conf b/.scalafmt.conf
new file mode 100755
index 0000000..7084efe
--- /dev/null
+++ b/.scalafmt.conf
@@ -0,0 +1,9 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+style = intellij
+danglingParentheses = false
+maxColumn = 120
+docstrings = JavaDoc
+rewrite.rules = [SortImports]
+project.git = true
diff --git a/build.gradle b/build.gradle
new file mode 100755
index 0000000..26f542d
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+buildscript {
+    repositories {
+        jcenter()
+    }
+    dependencies {
+        classpath "cz.alenkacz:gradle-scalafmt:${gradle.scalafmt.version}"
+    }
+}
+
+subprojects {
+    apply plugin: 'scalafmt'
+    scalafmt.configFilePath = gradle.scalafmt.config
+}
+
diff --git a/gradle/README.md b/gradle/README.md
new file mode 100755
index 0000000..14842f1
--- /dev/null
+++ b/gradle/README.md
@@ -0,0 +1,64 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Gradle
+
+Gradle is used to build OpenWhisk. It does not need to be pre-installed as it 
installs itself using the [Gradle 
Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). To use 
it without installing, simply invoke the `gradlew` command at the root of the 
repository. You can also install `gradle` via 
[`apt`](http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-12-04-and-derivatives/)
 on Ubuntu or [`brew`](http://www.brewformulas.org/Gradle) on Mac [...]
+
+## Usage
+
+In general, project level properties are set via 
`-P{propertyName}={propertyValue}`. A task is called via `gradle {taskName}` 
and a subproject task is called via `gradle :path:to:subproject:{taskName}`. To 
run tasks in parallel, use the `--parallel` flag (**Note:** It's an incubating 
feature and might break stuff).
+
+### Build
+
+To build all Docker images use `gradle distDocker` at the top level project, 
to build a specific component use `gradle :core:controller:distDocker`.
+
+Project level options that can be used on `distDocker`:
+
+- `dockerImageName` (*required*): The name of the image to build (e.g. 
whisk/controller)
+- `dockerHost` (*optional*): The docker host to run commands on, default 
behaviour is docker's own `DOCKER_HOST` environment variable
+- `dockerRegistry` (*optional*): The registry to push to
+- `dockerImageTag` (*optional*, default 'latest'): The tag for the image
+- `dockerTimeout` (*optional*, default 240): Timeout for docker operations in 
seconds
+- `dockerRetries` (*optional*, default 3): How many times to retry docker 
operations
+- `dockerBinary` (*optional*, default `docker`): The binary to execute docker 
commands
+
+### Test
+
+To run tests one uses the `test` task. OpenWhisk consolidates tests into a 
single `tests` project. Hence the command to run all tests is `gradle 
:tests:test`.
+
+It is possible to run specific tests using [Gradle 
testfilters](https://docs.gradle.org/current/userguide/java_plugin.html#test_filtering).
 For example `gradle :tests:test --tests 
"your.package.name.TestClass.evenMethodName"`. Wildcard `*` may be used 
anywhere.
+
+## Build your own `build.gradle`
+In Gradle, most of the tasks we use are default tasks provided by plugins in 
Gradle. The [`scala` 
Plugin](https://docs.gradle.org/current/userguide/scala_plugin.html) for 
example includes tasks, that are needed to build Scala projects. Moreover, 
Gradle is aware of *Applications*. The [`application` 
Plugin](https://docs.gradle.org/current/userguide/application_plugin.html) 
provides tasks that are required to distribute a self-contained application. 
When `application` and `scala` are used  [...]
+
+In OpenWhisk, we want to distribute our application via Docker images. Hence 
we wrote a "plugin" that creates the task `distDocker`. That task will build an 
image from the `Dockerfile` that is located next to the `build.gradle` it is 
called from, for example Controller's `Dockerfile` and `build.gradle` are both 
located at `core/controller`.
+
+If you want to create a new `build.gradle` for your component, simply put the 
`Dockerfile` right next to it and include `docker.gradle` by using
+
+```
+ext.dockerImageName = 'openwwhisk/{IMAGENAME}'
+apply from: 'path/to/docker.gradle'
+```
+
+If your component needs to be build before you can build the image, make 
`distDocker` depend on any task needed to run before it, for example:
+
+```
+distDocker.dependsOn ':common:scala:distDocker', 'distTar'
+```
diff --git a/gradle/docker.gradle b/gradle/docker.gradle
new file mode 100755
index 0000000..6ad6850
--- /dev/null
+++ b/gradle/docker.gradle
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import groovy.time.*
+
+/**
+ * Utility to build docker images based in gradle projects
+ *
+ * This extends gradle's 'application' plugin logic with a 'distDocker' task 
which builds
+ * a docker image from the Dockerfile of the project that applies this file. 
The image
+ * is automatically tagged and pushed if a tag and/or a registry is given.
+ *
+ * Parameters that can be set on project level:
+ * - dockerImageName (required): The name of the image to build (e.g. 
controller)
+ * - dockerRegistry (optional): The registry to push to
+ * - dockerImageTag (optional, default 'latest'): The tag for the image
+ * - dockerImagePrefix (optional, default 'whisk'): The prefix for the image,
+ *       'controller' becomes 'whisk/controller' per default
+ * - dockerTimeout (optional, default 840): Timeout for docker operations in 
seconds
+ * - dockerRetries (optional, default 3): How many times to retry docker 
operations
+ * - dockerBinary (optional, default 'docker'): The binary to execute docker 
commands
+ * - dockerBuildArgs (options, default ''): Project specific custom docker 
build arguments
+ * - dockerHost (optional): The docker host to run commands on, default 
behaviour is
+ *       docker's own DOCKER_HOST environment variable
+ */
+
+ext {
+    dockerRegistry = project.hasProperty('dockerRegistry') ? dockerRegistry + 
'/' : ''
+    dockerImageTag = project.hasProperty('dockerImageTag') ? dockerImageTag : 
'latest'
+    dockerImagePrefix = project.hasProperty('dockerImagePrefix') ? 
dockerImagePrefix : 'whisk'
+    dockerTimeout = project.hasProperty('dockerTimeout') ? 
dockerTimeout.toInteger() : 840
+    dockerRetries = project.hasProperty('dockerRetries') ? 
dockerRetries.toInteger() : 3
+    dockerBinary = project.hasProperty('dockerBinary') ? [dockerBinary] : 
['docker']
+    dockerBuildArg = ['build']
+}
+ext.dockerTaggedImageName = dockerRegistry + dockerImagePrefix + '/' + 
dockerImageName + ':' + dockerImageTag
+
+if(project.hasProperty('dockerHost')) {
+    dockerBinary += ['--host', project.dockerHost]
+}
+
+if(project.hasProperty('dockerBuildArgs')) {
+    dockerBuildArgs.each { arg  ->
+        dockerBuildArg += ['--build-arg', arg]
+    }
+}
+
+task distDocker {
+    doLast {
+        def start = new Date()
+        def cmd = dockerBinary + dockerBuildArg + ['-t', dockerImageName, 
project.buildscript.sourceFile.getParentFile().getAbsolutePath()]
+        retry(cmd, dockerRetries, dockerTimeout)
+        println("Building '${dockerImageName}' took ${TimeCategory.minus(new 
Date(), start)}")
+    }
+}
+task tagImage {
+    doLast {
+        def versionString = (dockerBinary + ['-v']).execute().text
+        def matched = (versionString =~ /(\d+)\.(\d+)\.(\d+)/)
+
+        def major = matched[0][1] as int
+        def minor = matched[0][2] as int
+
+        def dockerCmd = ['tag']
+        if(major == 1 && minor < 12) {
+            dockerCmd += ['-f']
+        }
+        retry(dockerBinary + dockerCmd + [dockerImageName, 
dockerTaggedImageName], dockerRetries, dockerTimeout)
+    }
+}
+
+task pushImage {
+    doLast {
+        def cmd = dockerBinary + ['push', dockerTaggedImageName]
+        retry(cmd, dockerRetries, dockerTimeout)
+    }
+}
+pushImage.dependsOn tagImage
+pushImage.onlyIf { dockerRegistry != '' }
+distDocker.finalizedBy pushImage
+
+def retry(cmd, retries, timeout) {
+    println("${new Date()}: Executing '${cmd.join(" ")}'")
+    def proc = cmd.execute()
+    proc.consumeProcessOutput(System.out, System.err)
+    proc.waitForOrKill(timeout * 1000)
+    if(proc.exitValue() != 0) {
+        def message = "${new Date()}: Command '${cmd.join(" ")}' failed with 
exitCode ${proc.exitValue()}"
+        if(proc.exitValue() == 143) { // 143 means the process was killed 
(SIGTERM signal)
+            message = "${new Date()}: Command '${cmd.join(" ")}' was killed 
after ${timeout} seconds"
+        }
+
+        if(retries > 1) {
+            println("${message}, ${retries-1} retries left, retrying...")
+            retry(cmd, retries-1, timeout)
+        }
+        else {
+            println("${message}, no more retries left, aborting...")
+            throw new GradleException(message)
+        }
+    }
+}
diff --git a/gradle/wrapper/gradle-wrapper.jar 
b/gradle/wrapper/gradle-wrapper.jar
new file mode 100755
index 0000000..7a3265e
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..d7cc33f
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,8 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to 
pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 
'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; 
then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" 
\"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### 
Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### 
Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" 
"$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" 
"$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" 
"$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; 
done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and 
substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 
"\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" 
org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder 
on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100755
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS 
to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your 
PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% 
"-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" 
org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code 
instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/rust1.32/Dockerfile b/rust1.32/Dockerfile
index 411b44c..d006114 100644
--- a/rust1.32/Dockerfile
+++ b/rust1.32/Dockerfile
@@ -20,7 +20,8 @@ COPY --from=builder /bin/proxy /bin/proxy
 RUN mkdir -p /action 
 ADD compile /bin/compile
 ADD src /usr/src
-RUN cd /usr/src ; cargo build 
+RUN cd /usr/src ; cargo build
+ENV PYTHONIOENCODING=utf8
 ENV OW_COMPILER=/bin/compile
 WORKDIR /action
 ENTRYPOINT ["/bin/proxy"]
diff --git a/rust1.32/build.gradle b/rust1.32/build.gradle
new file mode 100755
index 0000000..20ce6fa
--- /dev/null
+++ b/rust1.32/build.gradle
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ext.dockerImageName = 'actionloop-rust-v1.23'
+apply from: '../gradle/docker.gradle'
diff --git a/rust1.32/src/action_loop/src/main.rs 
b/rust1.32/src/action_loop/src/main.rs
index 25144be..2099f19 100644
--- a/rust1.32/src/action_loop/src/main.rs
+++ b/rust1.32/src/action_loop/src/main.rs
@@ -31,7 +31,11 @@ fn main() {
         match parsed_input {
             Ok(input) => {
                 for (key, val) in input.environment {
-                    env::set_var(format!("__OW_{}", key.to_uppercase()), 
val.to_string());
+                   if let Some(string_value) = val.as_str() {
+                        env::set_var(format!("__OW_{}", key.to_uppercase()), 
string_value);
+                    } else {
+                        env::set_var(format!("__OW_{}", key.to_uppercase()), 
val.to_string());
+                    };
                 }
                 match actionMain(input.value) {
                     Ok(action_result) => match 
serde_json::to_string(&action_result) {
diff --git a/settings.gradle b/settings.gradle
new file mode 100755
index 0000000..7b7d4f5
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+include 'tests'
+include 'rust1.32'
+
+rootProject.name = 'runtime-actionlooop'
+
+gradle.ext.openwhisk = [
+        version: '1.0.0-SNAPSHOT'
+]
+
+gradle.ext.scala = [
+    version: '2.11.8',
+    compileFlags: ['-feature', '-unchecked', '-deprecation', 
'-Xfatal-warnings', '-Ywarn-unused-import']
+]
+
+gradle.ext.scalafmt = [
+    version: '1.5.0',
+    config: new File(rootProject.projectDir, '.scalafmt.conf')
+]
+
diff --git a/tests/build.gradle b/tests/build.gradle
new file mode 100755
index 0000000..1ae5a4b
--- /dev/null
+++ b/tests/build.gradle
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'scala'
+apply plugin: 'eclipse'
+compileTestScala.options.encoding = 'UTF-8'
+
+repositories {
+    mavenCentral()
+    mavenLocal()
+}
+
+tasks.withType(Test) {
+    testLogging {
+        events "passed", "skipped", "failed"
+        showStandardStreams = true
+        exceptionFormat = 'full'
+    }
+    outputs.upToDateWhen { false } // force tests to run every time
+}
+
+dependencies {
+    compile "org.scala-lang:scala-library:${gradle.scala.version}"
+    compile 
"org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
+    compile 
"org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
+}
+
+tasks.withType(ScalaCompile) {
+    scalaCompileOptions.additionalParameters = gradle.scala.compileFlags
+}
diff --git 
a/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala 
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
new file mode 100755
index 0000000..efcaa19
--- /dev/null
+++ 
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package runtime.actionContainers
+
+import actionContainers.ActionContainer.withContainer
+import actionContainers.{ActionContainer, BasicActionRunnerTests}
+import common.WskActorSystem
+import org.junit.runner.RunWith
+import org.scalatest.junit.JUnitRunner
+
+@RunWith(classOf[JUnitRunner])
+class ActionLoopRustBasicTests extends BasicActionRunnerTests with 
WskActorSystem {
+
+  val image = "actionloop-rust-v1.23"
+
+  override def withActionContainer(env: Map[String, String] = Map.empty)(
+    code: ActionContainer => Unit) = {
+    withContainer(image, env)(code)
+  }
+
+  def withActionLoopContainer(code: ActionContainer => Unit) =
+    withContainer(image)(code)
+
+  behavior of image
+
+  override val testNoSourceOrExec = TestConfig("")
+
+  override val testNotReturningJson = TestConfig("", skipTest = true)
+
+  override val testEcho =
+    TestConfig("""|extern crate serde_json;
+                  |use serde_json::{Error, Value};
+                  |pub fn main(args: Value) -> Result<Value, Error> {
+                  |    println!("hello stdout");
+                  |    eprintln!("hello stderr");
+                  |    Ok(args)
+                  |}
+                """.stripMargin)
+  val snowman = """\""" + """u{2603}"""
+  val space = """\"""+"""u{0020}"""
+  override val testUnicode =
+    TestConfig(
+      raw"""|extern crate serde_json;
+            |use serde_derive::{Deserialize, Serialize};
+            |use serde_json::{Error, Value};
+            |#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+            |struct Input {
+            |    delimiter: String,
+            |}
+            |#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+            |struct Output {
+            |    winter: String,
+            |}
+            |pub fn main(args: Value) -> Result<Value, Error> {
+            |    let input: Input = serde_json::from_value(args)?;
+            |    let msg = format!("{} {} {}", 
input.delimiter,'☃',input.delimiter);
+            |    println!("{}", msg);
+            |    let output = Output {
+            |        winter: msg,
+            |   };
+            |   serde_json::to_value(output)
+            |}
+        """.stripMargin)
+
+  override val testEnv =
+    TestConfig("""|extern crate serde_json;
+                  |use serde_derive::{Deserialize, Serialize};
+                  |use serde_json::{Error, Value};
+                  |use std::env;
+                  |use std::env::VarError;
+                  |#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+                  |struct Output {
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |    api_host:Option<String>,
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |    api_key: Option<String>,
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |    namespace: Option<String>,
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |   action_name: Option<String>,
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |    activation_id: Option<String>,
+                  |    #[serde(skip_serializing_if = "Option::is_none")]
+                  |    deadline: Option<String>,
+                  |}
+                  |pub fn main(_args: Value) -> Result<Value, Error> {
+                  |    let output = Output {
+                  |        api_host: env::var("__OW_API_HOST").ok(),
+                  |        api_key: env::var("__OW_API_KEY").ok(),
+                  |        namespace: env::var("__OW_NAMESPACE").ok(),
+                  |        action_name: env::var("__OW_ACTION_NAME").ok(),
+                  |        activation_id: env::var("__OW_ACTIVATION_ID").ok(),
+                  |        deadline: env::var("__OW_DEADLINE").ok(),
+                  |    };
+                  |    serde_json::to_value(output)
+                  |}
+                """.stripMargin)
+
+
+  override val testInitCannotBeCalledMoreThanOnce =
+    TestConfig("""|extern crate serde_json;
+                  |use serde_json::{Error, Value};
+                  |pub fn main(args: Value) -> Result<Value, Error> {
+                  |    Ok(args)
+                  |}
+                """.stripMargin)
+
+  override val testEntryPointOtherThanMain =
+    TestConfig("""|extern crate serde_json;
+                  |use serde_json::{Error, Value};
+                  |pub fn naim(args: Value) -> Result<Value, Error> {
+                  |    Ok(args)
+                  |}
+                """.stripMargin, main="naim")
+
+  override val testLargeInput =
+    TestConfig("""|extern crate serde_json;
+                  |use serde_json::{Error, Value};
+                  |pub fn main(args: Value) -> Result<Value, Error> {
+                  |    Ok(args)
+                  |}
+                """.stripMargin)
+}
diff --git a/tools/invoke.py b/tools/invoke.py
new file mode 100755
index 0000000..68b2ca8
--- /dev/null
+++ b/tools/invoke.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+"""Executable Python script for testing the action proxy.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+  This script is useful for testing the action proxy (or its derivatives)
+  by simulating invoker interactions. Use it in combination with
+  docker run <image> which starts up the action proxy.
+  Example:
+     docker run -i -t -p 8080:8080 dockerskeleton # locally built images may 
be referenced without a tag
+     ./invoke.py init <action source file>
+     ./invoke.py run '{"some":"json object as a string"}'
+
+  For additional help, try ./invoke.py -h
+"""
+
+import os
+import re
+import sys
+import json
+import base64
+import requests
+import codecs
+import argparse
+try:
+    import argcomplete
+except ImportError:
+    argcomplete = False
+
+def main():
+    try:
+        args = parseArgs()
+        exitCode = {
+            'init' : init,
+            'run'   : run
+        }[args.cmd](args)
+    except Exception as e:
+        print(e)
+        exitCode = 1
+    sys.exit(exitCode)
+
+def dockerHost():
+    dockerHost = 'localhost'
+    if 'DOCKER_HOST' in os.environ:
+        try:
+            dockerHost = 
re.compile('tcp://(.*):[\d]+').findall(os.environ['DOCKER_HOST'])[0]
+        except Exception:
+            print('cannot determine docker host from %s' % 
os.environ['DOCKER_HOST'])
+            sys.exit(-1)
+    return dockerHost
+
+def containerRoute(args, path):
+    return 'http://%s:%s/%s' % (args.host, args.port, path)
+
+def parseArgs():
+    parser = argparse.ArgumentParser(description='initialize and run an 
OpenWhisk action container')
+    parser.add_argument('-v', '--verbose', help='verbose output', 
action='store_true')
+    parser.add_argument('--host', help='action container host', 
default=dockerHost())
+    parser.add_argument('-p', '--port', help='action container port number', 
default=8080, type=int)
+
+    subparsers = parser.add_subparsers(title='available commands', dest='cmd')
+
+    initmenu = subparsers.add_parser('init', help='initialize container with 
src or zip/tgz file')
+    initmenu.add_argument('-b', '--binary', help='treat artifact as binary', 
action='store_true')
+    initmenu.add_argument('main', nargs='?', default='main', help='name of the 
"main" entry method for the action')
+    initmenu.add_argument('artifact', help='a source file or zip/tgz archive')
+
+    runmenu = subparsers.add_parser('run', help='send arguments to container 
to run action')
+    runmenu.add_argument('payload', nargs='?', help='the arguments to send to 
the action, either a reference to a file or an inline JSON object', 
default=None)
+
+    if argcomplete:
+        argcomplete.autocomplete(parser)
+    return parser.parse_args()
+
+def init(args):
+    main = args.main
+    artifact = args.artifact
+
+    if artifact and (args.binary or artifact.endswith('.zip') or 
artifact.endswith('tgz') or artifact.endswith('jar')):
+        with open(artifact, 'rb') as fp:
+            contents = fp.read()
+        contents = base64.b64encode(contents)
+        binary = True
+    elif artifact is not '':
+        with(codecs.open(artifact, 'r', 'utf-8')) as fp:
+            contents = fp.read()
+        binary = False
+    else:
+        contents = None
+        binary = False
+
+    r = requests.post(
+        containerRoute(args, 'init'),
+        json = {"value": {"code": contents,
+                          "binary": binary,
+                          "main": main}})
+    print(r.text)
+
+def run(args):
+    value = processPayload(args.payload)
+    if args.verbose:
+        print('Sending value: %s...' % json.dumps(value)[0:40])
+    r = requests.post(containerRoute(args, 'run'), json = {"value": value})
+    print(r.text)
+
+def processPayload(payload):
+    if payload and os.path.exists(payload):
+        with open(payload) as fp:
+            return json.load(fp)
+    try:
+        d = json.loads(payload if payload else '{}')
+        if isinstance(d, dict):
+            return d
+        else:
+            raise
+    except:
+        print('payload must be a JSON object.')
+        sys.exit(-1)
+
+if __name__ == '__main__':
+    main()
diff --git a/rust1.32/Dockerfile b/tools/travis/build.sh
old mode 100644
new mode 100755
similarity index 54%
copy from rust1.32/Dockerfile
copy to tools/travis/build.sh
index 411b44c..e3aa931
--- a/rust1.32/Dockerfile
+++ b/tools/travis/build.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -14,13 +15,29 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM actionloop/actionloop-v2:latest as builder
-FROM rust:1.32
-COPY --from=builder /bin/proxy /bin/proxy
-RUN mkdir -p /action 
-ADD compile /bin/compile
-ADD src /usr/src
-RUN cd /usr/src ; cargo build 
-ENV OW_COMPILER=/bin/compile
-WORKDIR /action
-ENTRYPOINT ["/bin/proxy"]
+
+set -ex
+
+# Build script for Travis-CI.
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+WHISKDIR="$ROOTDIR/../openwhisk"
+UTILDIR="$ROOTDIR/../incubator-openwhisk-utilities"
+
+export OPENWHISK_HOME=$WHISKDIR
+
+# run scancode using the ASF Release configuration
+cd $UTILDIR
+scancode/scanCode.py --config scancode/ASF-Release.cfg $ROOTDIR
+
+# Build OpenWhisk deps before we run tests
+cd $WHISKDIR
+TERM=dumb ./gradlew install
+# Mock file (works around bug upstream)
+echo "openwhisk.home=$WHISKDIR" > whisk.properties
+echo "vcap.services.file=" >> whisk.properties
+
+# Build runtime
+cd $ROOTDIR
+TERM=dumb ./gradlew distDocker
diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh
new file mode 100755
index 0000000..e18795d
--- /dev/null
+++ b/tools/travis/publish.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -eux
+
+# Build script for Travis-CI.
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+WHISKDIR="$ROOTDIR/../openwhisk"
+
+export OPENWHISK_HOME=$WHISKDIR
+
+IMAGE_PREFIX=$1
+RUNTIME_VERSION=$2
+IMAGE_TAG=$3
+
+if [ ${RUNTIME_VERSION} == "2" ]; then
+  RUNTIME="python2Action"
+elif [ ${RUNTIME_VERSION} == "3" ]; then
+  RUNTIME="pythonAction"
+elif [ ${RUNTIME_VERSION} == "3-ai" ]; then
+  RUNTIME="python3AiAction"
+elif [ ${RUNTIME_VERSION} == "3-loop" ]; then
+  RUNTIME="pythonActionLoop"
+fi
+
+if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then
+docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}"
+fi
+
+if [[ ! -z ${RUNTIME} ]]; then
+TERM=dumb ./gradlew \
+:core:${RUNTIME}:distDocker \
+-PdockerRegistry=docker.io \
+-PdockerImagePrefix=${IMAGE_PREFIX} \
+-PdockerImageTag=${IMAGE_TAG}
+
+  # if doing latest also push a tag with the hash commit
+  if [ ${IMAGE_TAG} == "latest" ]; then
+  SHORT_COMMIT=`git rev-parse --short HEAD`
+  TERM=dumb ./gradlew \
+  :core:${RUNTIME}:distDocker \
+  -PdockerRegistry=docker.io \
+  -PdockerImagePrefix=${IMAGE_PREFIX} \
+  -PdockerImageTag=${SHORT_COMMIT}
+  fi
+
+fi
diff --git a/rust1.32/Dockerfile b/tools/travis/setup.sh
old mode 100644
new mode 100755
similarity index 63%
copy from rust1.32/Dockerfile
copy to tools/travis/setup.sh
index 411b44c..3424cdb
--- a/rust1.32/Dockerfile
+++ b/tools/travis/setup.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -14,13 +15,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM actionloop/actionloop-v2:latest as builder
-FROM rust:1.32
-COPY --from=builder /bin/proxy /bin/proxy
-RUN mkdir -p /action 
-ADD compile /bin/compile
-ADD src /usr/src
-RUN cd /usr/src ; cargo build 
-ENV OW_COMPILER=/bin/compile
-WORKDIR /action
-ENTRYPOINT ["/bin/proxy"]
+
+set -e
+
+# Build script for Travis-CI.
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+HOMEDIR="$SCRIPTDIR/../../../"
+
+# clone OpenWhisk utilities repo. in order to run scanCode
+cd $HOMEDIR
+git clone https://github.com/apache/incubator-openwhisk-utilities.git
+
+# clone main openwhisk repo. for testing purposes
+git clone --depth=1 https://github.com/apache/incubator-openwhisk.git openwhisk
+cd openwhisk
+./tools/travis/setup.sh
diff --git a/rust1.32/Dockerfile b/tools/travis/test.sh
old mode 100644
new mode 100755
similarity index 73%
copy from rust1.32/Dockerfile
copy to tools/travis/test.sh
index 411b44c..7ba1b89
--- a/rust1.32/Dockerfile
+++ b/tools/travis/test.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -14,13 +15,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM actionloop/actionloop-v2:latest as builder
-FROM rust:1.32
-COPY --from=builder /bin/proxy /bin/proxy
-RUN mkdir -p /action 
-ADD compile /bin/compile
-ADD src /usr/src
-RUN cd /usr/src ; cargo build 
-ENV OW_COMPILER=/bin/compile
-WORKDIR /action
-ENTRYPOINT ["/bin/proxy"]
+
+set -ex
+
+# Build script for Travis-CI.
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+ROOTDIR="$SCRIPTDIR/../.."
+WHISKDIR="$ROOTDIR/../openwhisk"
+
+export OPENWHISK_HOME=$WHISKDIR
+cd ${ROOTDIR}
+TERM=dumb ./gradlew :tests:checkScalafmtAll
+TERM=dumb ./gradlew :tests:testPython3

Reply via email to