From a66b582fbfd72721100d401c07c331e9d77eaa72 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 12:24:10 +0100 Subject: [PATCH 1/6] use apache sources --- core/python2ActionLoop/Dockerfile | 7 ++++--- core/python3ActionLoop/Dockerfile | 8 +++++++- core/python3AiActionLoop/Dockerfile | 9 +++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/core/python2ActionLoop/Dockerfile b/core/python2ActionLoop/Dockerfile index 2d3e2782..323c3bec 100644 --- a/core/python2ActionLoop/Dockerfile +++ b/core/python2ActionLoop/Dockerfile @@ -17,9 +17,10 @@ # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ + https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy diff --git a/core/python3ActionLoop/Dockerfile b/core/python3ActionLoop/Dockerfile index dee8c5f5..aafa34c8 100644 --- a/core/python3ActionLoop/Dockerfile +++ b/core/python3ActionLoop/Dockerfile @@ -16,7 +16,13 @@ # # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ + https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ + cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ + mv proxy /bin/proxy + RUN git clone --branch dev \ https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ diff --git a/core/python3AiActionLoop/Dockerfile b/core/python3AiActionLoop/Dockerfile index 3b422e6a..60943ab6 100644 --- a/core/python3AiActionLoop/Dockerfile +++ b/core/python3AiActionLoop/Dockerfile @@ -17,9 +17,10 @@ # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ + https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy @@ -27,7 +28,7 @@ RUN git clone --branch dev \ FROM golang:1.12 AS builder_release ARG GO_PROXY_RELEASE_VERSION=1.12@1.15.0 RUN curl -sL \ - https://github.com/apache/openwhisk-runtime-go/archive/{$GO_PROXY_RELEASE_VERSION}.tar.gz\ + https://github.com/apache/openwhisk-runtime-go/archive/${GO_PROXY_RELEASE_VERSION}.tar.gz\ | tar xzf -\ && cd openwhisk-runtime-go-*/main\ && GO111MODULE=on go build -o /bin/proxy From cd123a03336fdd50649fc883dfbc00ba67295a5b Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 13:15:43 +0100 Subject: [PATCH 2/6] disabling python2-actionloop and python3-ai-actionloop tests as the runtimes are not built --- ...ainerTests.scala => Python2ActionLoopContainerTests.scala.off} | 0 ...erTests.scala => Python3AiActionLoopContainerTests.scala.wait} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/src/test/scala/runtime/actionContainers/{Python2ActionLoopContainerTests.scala => Python2ActionLoopContainerTests.scala.off} (100%) rename tests/src/test/scala/runtime/actionContainers/{Python3AiActionLoopContainerTests.scala => Python3AiActionLoopContainerTests.scala.wait} (100%) diff --git a/tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala b/tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala.off similarity index 100% rename from tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala rename to tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala.off diff --git a/tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala b/tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala.wait similarity index 100% rename from tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala rename to tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala.wait From 20fd3aa7a006950745f762a2be7a128be185a569 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 14:13:09 +0100 Subject: [PATCH 3/6] fix variables --- core/python2ActionLoop/Dockerfile | 4 ++-- core/python3ActionLoop/Dockerfile | 4 ++-- core/python3AiActionLoop/Dockerfile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/python2ActionLoop/Dockerfile b/core/python2ActionLoop/Dockerfile index 323c3bec..5d0d6034 100644 --- a/core/python2ActionLoop/Dockerfile +++ b/core/python2ActionLoop/Dockerfile @@ -19,8 +19,8 @@ FROM golang:1.12 AS builder_source ARG GO_PROXY_GITHUB_USER=apache ARG GO_PROXY_GITHUB_BRANCH=master -RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ - https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy diff --git a/core/python3ActionLoop/Dockerfile b/core/python3ActionLoop/Dockerfile index aafa34c8..c41f77c4 100644 --- a/core/python3ActionLoop/Dockerfile +++ b/core/python3ActionLoop/Dockerfile @@ -18,8 +18,8 @@ FROM golang:1.12 AS builder_source ARG GO_PROXY_GITHUB_USER=apache ARG GO_PROXY_GITHUB_BRANCH=master -RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ - https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy diff --git a/core/python3AiActionLoop/Dockerfile b/core/python3AiActionLoop/Dockerfile index 60943ab6..97a7cd97 100644 --- a/core/python3AiActionLoop/Dockerfile +++ b/core/python3AiActionLoop/Dockerfile @@ -19,8 +19,8 @@ FROM golang:1.12 AS builder_source ARG GO_PROXY_GITHUB_USER=apache ARG GO_PROXY_GITHUB_BRANCH=master -RUN git clone --branch ${GO_PROXY_GITHUB_USER} \ - https://github.com/${GO_PROXY_GITHUB_BRANCH}/openwhisk-runtime-go /src ;\ +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy From 0e0232046359db1fd1a099ed973533ffd7140a59 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 14:48:50 +0100 Subject: [PATCH 4/6] forgot nimbella-corp --- core/python3ActionLoop/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/python3ActionLoop/Dockerfile b/core/python3ActionLoop/Dockerfile index c41f77c4..4be89e46 100644 --- a/core/python3ActionLoop/Dockerfile +++ b/core/python3ActionLoop/Dockerfile @@ -23,11 +23,6 @@ RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ - cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ - mv proxy /bin/proxy - # or build it from a release FROM golang:1.12 AS builder_release ARG GO_PROXY_RELEASE_VERSION=1.12@1.15.0 From 27f5868dd766a5f4b0cddf75e1622b750e806a7e Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 16:18:07 +0100 Subject: [PATCH 5/6] exluding python2 test and building python3 action loop --- .travis.yml | 2 +- tests/build.gradle | 2 ++ ...nerTests.scala.off => Python2ActionLoopContainerTests.scala} | 0 ...Tests.scala.wait => Python3AiActionLoopContainerTests.scala} | 0 tools/travis/publish.sh | 2 ++ 5 files changed, 5 insertions(+), 1 deletion(-) rename tests/src/test/scala/runtime/actionContainers/{Python2ActionLoopContainerTests.scala.off => Python2ActionLoopContainerTests.scala} (100%) rename tests/src/test/scala/runtime/actionContainers/{Python3AiActionLoopContainerTests.scala.wait => Python3AiActionLoopContainerTests.scala} (100%) diff --git a/.travis.yml b/.travis.yml index 2184acff..80744bdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,7 @@ deploy: all_branches: true repo: apache/openwhisk-runtime-python - provider: script - script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly" + script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly && ./tools/travis/publish.sh openwhisk 3-ailoop nightly" on: branch: master repo: apache/openwhisk-runtime-python diff --git a/tests/build.gradle b/tests/build.gradle index e7207286..01e8bdeb 100644 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -44,6 +44,8 @@ tasks.withType(ScalaCompile) { } task testPython3(type: Test) { + // python2 is end-of-life and the runtime not built by default + exclude 'scala/runtime/actionContainers/Python2ActionLoopContainerTests' } task buildArtifacts(type:Exec) { diff --git a/tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala.off b/tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala similarity index 100% rename from tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala.off rename to tests/src/test/scala/runtime/actionContainers/Python2ActionLoopContainerTests.scala diff --git a/tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala.wait b/tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala similarity index 100% rename from tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala.wait rename to tests/src/test/scala/runtime/actionContainers/Python3AiActionLoopContainerTests.scala diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh index add19e92..d6819577 100755 --- a/tools/travis/publish.sh +++ b/tools/travis/publish.sh @@ -36,6 +36,8 @@ elif [ ${RUNTIME_VERSION} == "3-ai" ]; then RUNTIME="python3AiAction" elif [ ${RUNTIME_VERSION} == "3-loop" ]; then RUNTIME="pythonActionLoop" +elif [ ${RUNTIME_VERSION} == "3-loopai" ]; then + RUNTIME="python3AiActionLoop" fi if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then From 72614ca76364d16567e12b35641b6bf35482e4c7 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 13 Mar 2020 16:37:44 +0100 Subject: [PATCH 6/6] typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 80744bdf..217a6809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,7 @@ deploy: all_branches: true repo: apache/openwhisk-runtime-python - provider: script - script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly && ./tools/travis/publish.sh openwhisk 3-ailoop nightly" + script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly && ./tools/travis/publish.sh openwhisk 3-loopai nightly" on: branch: master repo: apache/openwhisk-runtime-python