openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgr...@apache.org
Subject [openwhisk-runtime-swift] branch master updated: Use nightly go proxy build to fix env issue. (#112)
Date Wed, 08 Jan 2020 15:20:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 418ced7  Use nightly go proxy build to fix env issue. (#112)
418ced7 is described below

commit 418ced76f56f71ad367b0c36e0fdf895cec51ead
Author: rodric rabbah <rodric@gmail.com>
AuthorDate: Wed Jan 8 10:20:47 2020 -0500

    Use nightly go proxy build to fix env issue. (#112)
    
    * Use nightly go proxy build to fix env issue.
    
    * Build proxy two ways.
    
    * Use mv instead of ln because ln can silently fail. Fix gradle bug.
---
 core/swift51Action/Dockerfile | 19 ++++++++++++++++---
 gradle/docker.gradle          |  2 +-
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/core/swift51Action/Dockerfile b/core/swift51Action/Dockerfile
index 337caff..2dc15e2 100644
--- a/core/swift51Action/Dockerfile
+++ b/core/swift51Action/Dockerfile
@@ -14,14 +14,25 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM golang:1.12 as builder
+
+# 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
+
+# or build it from a release
+FROM golang:1.12 AS builder_release
+ARG GO_PROXY_RELEASE_VERSION=golang1.12@1.14.0
 RUN curl -sL \
-  https://github.com/apache/openwhisk-runtime-go/archive/golang1.11@1.14.0.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 swift:5.1.2
 
+# select the builder to use
+ARG GO_PROXY_BUILD_FROM=source
+
 RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get -qq update \
 	&& apt-get install -y --no-install-recommends locales python3 vim libssl-dev libicu-dev
\
 	&& rm -rf /var/lib/apt/lists/* \
@@ -34,7 +45,9 @@ ENV LANG="en_US.UTF-8" \
 RUN mkdir -p /swiftAction
 WORKDIR /swiftAction
 
-COPY --from=builder /bin/proxy /bin/proxy
+COPY --from=builder_source /bin/proxy /bin/proxy_source
+COPY --from=builder_release /bin/proxy /bin/proxy_release
+RUN mv /bin/proxy_${GO_PROXY_BUILD_FROM} /bin/proxy
 ADD swiftbuild.py /bin/compile
 ADD swiftbuild.py.launcher.swift /bin/compile.launcher.swift
 COPY _Whisk.swift /swiftAction/Sources/
diff --git a/gradle/docker.gradle b/gradle/docker.gradle
index 6ad6850..790c1e1 100644
--- a/gradle/docker.gradle
+++ b/gradle/docker.gradle
@@ -54,7 +54,7 @@ if(project.hasProperty('dockerHost')) {
 }
 
 if(project.hasProperty('dockerBuildArgs')) {
-    dockerBuildArgs.each { arg  ->
+    dockerBuildArgs.split(' ').each { arg  ->
         dockerBuildArg += ['--build-arg', arg]
     }
 }


Mime
View raw message