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-rust.git
The following commit(s) were added to refs/heads/master by this push:
new 17baf3e .travis.yml to build the image (#8)
17baf3e is described below
commit 17baf3ed182fb528f3efdaaaea1d53c6829d9a9f
Author: Michele Sciabarra <[email protected]>
AuthorDate: Fri Apr 12 04:53:03 2019 +0200
.travis.yml to build the image (#8)
update to rust 1.34 and setup travis for CI testing and image publish
Co-authored-by: Michele Sciabarra <[email protected]>
Co-authored-by: Carlos Santana <[email protected]>
---
.gitignore | 8 +++++
.travis.yml | 35 ++++++++++++++++++++++
README.md | 30 +++++++++++--------
{rust1.32 => rust1.34}/Dockerfile | 6 ++--
{rust1.32 => rust1.34}/Makefile | 0
{rust1.32 => rust1.34}/build.gradle | 2 +-
{rust1.32 => rust1.34}/compile | 0
{rust1.32 => rust1.34}/src/Cargo.lock | 0
{rust1.32 => rust1.34}/src/Cargo.toml | 0
{rust1.32 => rust1.34}/src/action_loop/Cargo.toml | 0
{rust1.32 => rust1.34}/src/action_loop/src/main.rs | 0
{rust1.32 => rust1.34}/src/actions/.gitignore | 0
{rust1.32 => rust1.34}/src/actions/Cargo.toml | 0
{rust1.32 => rust1.34}/src/actions/src/lib.rs | 0
settings.gradle | 2 +-
.../ActionLoopRustBasicTests.scala | 17 +++++------
tools/travis/publish.sh | 22 ++------------
tools/travis/{test.sh => scan.sh} | 10 +++----
tools/travis/setup.sh | 2 +-
tools/travis/test.sh | 2 +-
20 files changed, 84 insertions(+), 52 deletions(-)
diff --git a/.gitignore b/.gitignore
index 514b1e1..c5218e3 100755
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,14 @@ node_modules
# Vagrant
.vagrant*
+# Eclipse
+tests/bin/
+**/.project
+.settings/
+.classpath
+.cache-main
+.cache-tests
+
# IntelliJ
.idea
*.class
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..6572f2c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+sudo: required
+services:
+- docker
+notifications:
+ webhooks:
+ urls:
+ # travis2slack webhook to enable DMs on openwhisk-team.slack.com to PR
authors with TravisCI results
+ secure:
"pbZEezFpR0lM2xakTVWEd0Lkx4QMBSdcrZBrvpXSVc55rmWTghOvzz0Rie4zlRO8M1QH5vSwGHxwbkGSog0i4DF7rSIY9yIRd4wDb3r2V4zNEhgWHwUznkxUsH/nNgnpB8MVegezOldWCmct2KC+eg/K/zGyzYXX+ZhVR8niu+FZsWYgC/K/TblldNzdKEk3PzeYFgHmxBVOeIOXkXyTnqpBzPotgFQ+pLAeUgghVtGnOii2z6PYLj0OHS0Si6sq5BfZ19FFGOIBbqbyiSCp4bvCn04r979ZgTJENF+4F/r7zN5B+FDk03bBsqr5XnWT7L7E35RqWYWK1jkbi4VFLJ5gc9tzIKhzU4xHlsuF8ZvH29NqAvRWoGflKyCBMaXV6RaSlfWUmQ8tBXLXa4ORcJHpzB8JPiADWjy47gfxlK9kz/T+yN9FsYTU9uaKnb82c8Re0x+7gxLyvcVFEBrvfgb7nAblE
[...]
+
+before_install:
+- "./tools/travis/setup.sh"
+install: true
+script:
+- "./tools/travis/scan.sh && ./tools/travis/build.sh && ./tools/travis/test.sh"
+deploy:
+- provider: script
+ skip_cleanup: true
+ script: "./tools/travis/publish.sh openwhisk ${TRAVIS_TAG%@*}
${TRAVIS_TAG##*@}"
+ on:
+ tags: true
+ all_branches: true
+ repo: apache/incubator-openwhisk-runtime-rust
+- provider: script
+ skip_cleanup: true
+ script: "./tools/travis/publish.sh openwhisk rust1.34 latest"
+ on:
+ branch: master
+ repo: apache/incubator-openwhisk-runtime-rust
+env:
+ global:
+ - secure:
0Zk7istlUWhzCAMQvNSYEewgQmOF4uexJH/yh+35sifvX60tM2Hpq2ieZCgvTNgLhHPZmEJnRxldAgWGnwax4ROQyzJR+Qbu481KatwPEw5j+PpBP1rFUA5evYJC7gCG1INffliji0yd6WyoUMlwasMEyeyaqfRmdw3W4wMUXF/z1ya6cgAR9HxKegiOxtp4qjeFGk5PcyfxY5PoWroLeE3gpr5mjb7KoW6UzkkSlhJEsI9iMHyoUTln9ZTsLmBiGCmWC1cp6vaKq/K0t1p4bFm5Hg0vJMbb230jcdP9NyvLJJd9UX2eH0G/ER+QzkSM94OQwhQjTzPppC6YAluxUg5ZYr+Ik5ASHXc4WJXag4MRIrur24d60YI0iwodZe05c8ZA/Ksj41RscrbMBv3tIxDalJtY8DNfdfSL3qP3vZEFPyyAIs9jpUm36nY+VYlW0rP2AiEQNcv7rNNGCLqKVQnlbVR4ccCY
[...]
+ - secure:
wwxICr/9NXNF1xTijUW2187d/EuHsjN6QhFW0wkF8hoJALl5MYvJ5FAfInPHchcZaiqt8p9fAgcnNaUiQ4jDmDomDVDQUzxw/Vkr3jOPleM/qeL7RJUHWXnBgKbEU2R89HWPSBCc2KUcyGihJcjPGs9banx41heiTDteXIq/P/+bmOjn3DW4wuazTum3fpZD3r/GE/1zhJN3WvGGJoei2BypSI41FXVdrl5kdkQGWU/XFPhV6ER6G8Y2OIPx/9iOpy8mvhKBDR5HKelDz5xTDUYn5c8V7/Mi5IyXWVzDPFovurlN3pf9Mkqyf0Pc5uGgy9UU+Lkq/PsA/jXaRKq3tJm5idD2VuAAGQpyPh0RHKdckX2xM551q1sWr4UVgFPBtCumguRi8jXBRQh4BkxJWm5UaHJh/i6eN634d/qUGJKw0sktWYFOkoY2mebkMMfFhu1a0dPzBB2D8uqRv/7oLDgx16RI4eGC
[...]
diff --git a/README.md b/README.md
index 6b71be7..760c389 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,21 @@
+<!--
+#
+# 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.
+#
+-->
# incubator-openwhisk-runtime-rust
Work in Progress! Do not use yet...
@@ -6,15 +24,3 @@ It will be awesome.
[](http://www.apache.org/licenses/LICENSE-2.0)
[](https://travis-ci.org/apache/incubator-openwhisk-runtime-rust)
-# Work Done
-
-- implemented the actionloop
-- implemented the Docker image
-- implemented the action compiler
-- refactored to a more rustacean form
-
-# Work to do
-
-- Add the gradle build
-- Implement the mandatory scala tests
-- Submit and add to the list of supported runtimes
diff --git a/rust1.32/Dockerfile b/rust1.34/Dockerfile
similarity index 92%
rename from rust1.32/Dockerfile
rename to rust1.34/Dockerfile
index d006114..8e03ab6 100644
--- a/rust1.32/Dockerfile
+++ b/rust1.34/Dockerfile
@@ -14,10 +14,10 @@
# 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
+FROM openwhisk/actionloop-v2:4376fee as builder
+FROM rust:1.34
COPY --from=builder /bin/proxy /bin/proxy
-RUN mkdir -p /action
+RUN mkdir -p /action
ADD compile /bin/compile
ADD src /usr/src
RUN cd /usr/src ; cargo build
diff --git a/rust1.32/Makefile b/rust1.34/Makefile
similarity index 100%
rename from rust1.32/Makefile
rename to rust1.34/Makefile
diff --git a/rust1.32/build.gradle b/rust1.34/build.gradle
similarity index 94%
rename from rust1.32/build.gradle
rename to rust1.34/build.gradle
index 20ce6fa..9492350 100755
--- a/rust1.32/build.gradle
+++ b/rust1.34/build.gradle
@@ -15,5 +15,5 @@
* limitations under the License.
*/
-ext.dockerImageName = 'actionloop-rust-v1.23'
+ext.dockerImageName = 'actionloop-rust-v1.34'
apply from: '../gradle/docker.gradle'
diff --git a/rust1.32/compile b/rust1.34/compile
similarity index 100%
rename from rust1.32/compile
rename to rust1.34/compile
diff --git a/rust1.32/src/Cargo.lock b/rust1.34/src/Cargo.lock
similarity index 100%
rename from rust1.32/src/Cargo.lock
rename to rust1.34/src/Cargo.lock
diff --git a/rust1.32/src/Cargo.toml b/rust1.34/src/Cargo.toml
similarity index 100%
rename from rust1.32/src/Cargo.toml
rename to rust1.34/src/Cargo.toml
diff --git a/rust1.32/src/action_loop/Cargo.toml
b/rust1.34/src/action_loop/Cargo.toml
similarity index 100%
rename from rust1.32/src/action_loop/Cargo.toml
rename to rust1.34/src/action_loop/Cargo.toml
diff --git a/rust1.32/src/action_loop/src/main.rs
b/rust1.34/src/action_loop/src/main.rs
similarity index 100%
rename from rust1.32/src/action_loop/src/main.rs
rename to rust1.34/src/action_loop/src/main.rs
diff --git a/rust1.32/src/actions/.gitignore b/rust1.34/src/actions/.gitignore
similarity index 100%
rename from rust1.32/src/actions/.gitignore
rename to rust1.34/src/actions/.gitignore
diff --git a/rust1.32/src/actions/Cargo.toml b/rust1.34/src/actions/Cargo.toml
similarity index 100%
rename from rust1.32/src/actions/Cargo.toml
rename to rust1.34/src/actions/Cargo.toml
diff --git a/rust1.32/src/actions/src/lib.rs b/rust1.34/src/actions/src/lib.rs
similarity index 100%
rename from rust1.32/src/actions/src/lib.rs
rename to rust1.34/src/actions/src/lib.rs
diff --git a/settings.gradle b/settings.gradle
index 7b7d4f5..1e627a9 100755
--- a/settings.gradle
+++ b/settings.gradle
@@ -16,7 +16,7 @@
*/
include 'tests'
-include 'rust1.32'
+include 'rust1.34'
rootProject.name = 'runtime-actionlooop'
diff --git
a/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
index efcaa19..67f281f 100755
---
a/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
+++
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
@@ -25,10 +25,9 @@ import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class ActionLoopRustBasicTests extends BasicActionRunnerTests with
WskActorSystem {
- val image = "actionloop-rust-v1.23"
+ val image = "actionloop-rust-v1.34"
- override def withActionContainer(env: Map[String, String] = Map.empty)(
- code: ActionContainer => Unit) = {
+ override def withActionContainer(env: Map[String, String] = Map.empty)(code:
ActionContainer => Unit) = {
withContainer(image, env)(code)
}
@@ -51,10 +50,9 @@ class ActionLoopRustBasicTests extends
BasicActionRunnerTests with WskActorSyste
|}
""".stripMargin)
val snowman = """\""" + """u{2603}"""
- val space = """\"""+"""u{0020}"""
+ val space = """\""" + """u{0020}"""
override val testUnicode =
- TestConfig(
- raw"""|extern crate serde_json;
+ TestConfig(raw"""|extern crate serde_json;
|use serde_derive::{Deserialize, Serialize};
|use serde_json::{Error, Value};
|#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -110,7 +108,6 @@ class ActionLoopRustBasicTests extends
BasicActionRunnerTests with WskActorSyste
|}
""".stripMargin)
-
override val testInitCannotBeCalledMoreThanOnce =
TestConfig("""|extern crate serde_json;
|use serde_json::{Error, Value};
@@ -120,12 +117,14 @@ class ActionLoopRustBasicTests extends
BasicActionRunnerTests with WskActorSyste
""".stripMargin)
override val testEntryPointOtherThanMain =
- TestConfig("""|extern crate serde_json;
+ TestConfig(
+ """|extern crate serde_json;
|use serde_json::{Error, Value};
|pub fn naim(args: Value) -> Result<Value, Error> {
| Ok(args)
|}
- """.stripMargin, main="naim")
+ """.stripMargin,
+ main = "naim")
override val testLargeInput =
TestConfig("""|extern crate serde_json;
diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh
index e18795d..93da2b1 100755
--- a/tools/travis/publish.sh
+++ b/tools/travis/publish.sh
@@ -20,33 +20,17 @@ 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
+RUNTIME=$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 \
+:${RUNTIME}:distDocker \
-PdockerRegistry=docker.io \
-PdockerImagePrefix=${IMAGE_PREFIX} \
-PdockerImageTag=${IMAGE_TAG}
@@ -55,7 +39,7 @@ TERM=dumb ./gradlew \
if [ ${IMAGE_TAG} == "latest" ]; then
SHORT_COMMIT=`git rev-parse --short HEAD`
TERM=dumb ./gradlew \
- :core:${RUNTIME}:distDocker \
+ :${RUNTIME}:distDocker \
-PdockerRegistry=docker.io \
-PdockerImagePrefix=${IMAGE_PREFIX} \
-PdockerImageTag=${SHORT_COMMIT}
diff --git a/tools/travis/test.sh b/tools/travis/scan.sh
similarity index 82%
copy from tools/travis/test.sh
copy to tools/travis/scan.sh
index 7ba1b89..58acec2 100755
--- a/tools/travis/test.sh
+++ b/tools/travis/scan.sh
@@ -22,9 +22,9 @@ set -ex
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/../.."
-WHISKDIR="$ROOTDIR/../openwhisk"
+UTILDIR="$ROOTDIR/../incubator-openwhisk-utilities"
-export OPENWHISK_HOME=$WHISKDIR
-cd ${ROOTDIR}
-TERM=dumb ./gradlew :tests:checkScalafmtAll
-TERM=dumb ./gradlew :tests:testPython3
+# run scancode using the ASF Release configuration
+pushd $UTILDIR
+scancode/scanCode.py --config scancode/ASF-Release.cfg $ROOTDIR
+popd
diff --git a/tools/travis/setup.sh b/tools/travis/setup.sh
index 3424cdb..84b3b33 100755
--- a/tools/travis/setup.sh
+++ b/tools/travis/setup.sh
@@ -26,7 +26,7 @@ HOMEDIR="$SCRIPTDIR/../../../"
# clone OpenWhisk utilities repo. in order to run scanCode
cd $HOMEDIR
-git clone https://github.com/apache/incubator-openwhisk-utilities.git
+git clone --depth=1 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
diff --git a/tools/travis/test.sh b/tools/travis/test.sh
index 7ba1b89..a5b249d 100755
--- a/tools/travis/test.sh
+++ b/tools/travis/test.sh
@@ -27,4 +27,4 @@ WHISKDIR="$ROOTDIR/../openwhisk"
export OPENWHISK_HOME=$WHISKDIR
cd ${ROOTDIR}
TERM=dumb ./gradlew :tests:checkScalafmtAll
-TERM=dumb ./gradlew :tests:testPython3
+TERM=dumb ./gradlew :tests:test