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-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0215046  Add support for .Net dotnet:2.2 action kind (#1019)
0215046 is described below

commit 021504659daa85140df57c0e4427f50ecb36c877
Author: Shawn Black <[email protected]>
AuthorDate: Sat Dec 15 07:20:42 2018 -0600

    Add support for .Net dotnet:2.2 action kind (#1019)
---
 runtimes/runtimes.go                               |  24 +++++++++++++++++++++
 specification/html/spec_actions.md                 |   1 +
 tests/src/integration/runtimetests/manifest.yaml   |   8 +++++++
 .../runtimetests/src/helloDotNet.src.zip           | Bin 0 -> 776 bytes
 .../integration/runtimetests/src/helloDotNet.zip   | Bin 0 -> 677014 bytes
 5 files changed, 33 insertions(+)

diff --git a/runtimes/runtimes.go b/runtimes/runtimes.go
index 73779e4..ecd3dd4 100644
--- a/runtimes/runtimes.go
+++ b/runtimes/runtimes.go
@@ -39,6 +39,7 @@ const (
        PYTHON_FILE_EXTENSION   = "py"
        JAVA_FILE_EXTENSION     = "java"
        JAR_FILE_EXTENSION      = "jar"
+       CSHARP_FILE_EXTENSION   = "cs"
        PHP_FILE_EXTENSION      = "php"
        ZIP_FILE_EXTENSION      = "zip"
        RUBY_FILE_EXTENSION     = "rb"
@@ -47,6 +48,7 @@ const (
        SWIFT_RUNTIME           = SWIFT_FILE_EXTENSION
        PYTHON_RUNTIME          = "python"
        JAVA_RUNTIME            = JAVA_FILE_EXTENSION
+       DOTNET_RUNTIME          = ZIP_FILE_EXTENSION
        PHP_RUNTIME             = PHP_FILE_EXTENSION
        RUBY_RUNTIME            = "ruby"
        GO_RUNTIME              = GO_FILE_EXTENSION
@@ -202,6 +204,9 @@ func FileExtensionRuntimes(op OpenWhiskInfo) (ext 
map[string]string) {
                        ext[RUBY_FILE_EXTENSION] = k
                } else if strings.Contains(k, GO_RUNTIME) {
                        ext[GO_FILE_EXTENSION] = k
+               } else if strings.Contains(k, DOTNET_RUNTIME) {
+                       ext[CSHARP_FILE_EXTENSION] = k
+                       ext[ZIP_FILE_EXTENSION] = k
                }
        }
        return
@@ -227,6 +232,8 @@ func FileRuntimeExtensions(op OpenWhiskInfo) (rte 
map[string]string) {
                                        rte[v[i].Kind] = RUBY_FILE_EXTENSION
                                } else if strings.Contains(k, GO_RUNTIME) {
                                        rte[v[i].Kind] = GO_FILE_EXTENSION
+                               } else if strings.Contains(k, DOTNET_RUNTIME) {
+                                       rte[v[i].Kind] = CSHARP_FILE_EXTENSION
                                }
                        }
                }
@@ -510,6 +517,23 @@ var RUNTIME_DETAILS = []byte(`{
                     "tag": "latest"
                 }
             }
+        ],
+        "dotnet": [
+            {
+                "kind": "dotnet:2.2",
+                "default": true,
+                "deprecated": false,
+                "requireMain": true,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-dotnet-v2.2",
+                    "tag": "latest"
+                },
+                "attached": {
+                    "attachmentName": "codefile",
+                    "attachmentType": "text/plain"
+                }
+            }
         ]
     },
     "blackboxes": [
diff --git a/specification/html/spec_actions.md 
b/specification/html/spec_actions.md
index 13ee895..b13735c 100644
--- a/specification/html/spec_actions.md
+++ b/specification/html/spec_actions.md
@@ -145,6 +145,7 @@ These packages may vary by OpenWhisk release; examples of 
supported runtimes as
 | ruby | ruby:2.5 | openwhisk/action-ruby-v2.5:latest | Latest Ruby 2.5 
language runtime |
 | [email protected] | swift | openwhisk/action-swift-v4.1:latest | Latest Swift 4.1 
language runtime |
 | [email protected] | swift | openwhisk/action-swift-v3.1.1:latest | Latest Swift 
3.1.1 language runtime |
+| dotnet, [email protected] | dotnet:2.2 | openwhisk/action-dotnet-v2.2:latest | 
Latest .NET Core 2.2 runtime |
 | language:default | N/A | N/A | Permit the OpenWhisk platform to select the 
correct default language runtime. |
 
 #### Notes
diff --git a/tests/src/integration/runtimetests/manifest.yaml 
b/tests/src/integration/runtimetests/manifest.yaml
index 32bebf2..5064ec6 100644
--- a/tests/src/integration/runtimetests/manifest.yaml
+++ b/tests/src/integration/runtimetests/manifest.yaml
@@ -100,6 +100,10 @@ packages:
                 function: src/hello.jar
                 runtime: java
                 main: Hello
+            helloworlddotnet22-with-explicit-runtime:
+                function: src/helloDotNet.zip
+                runtime: dotnet:2.2
+                main: 
Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main
             zipaction-with-explicit-runtime:
                 function: src/helloworld
                 runtime: nodejs:6
@@ -268,3 +272,7 @@ packages:
                 function: src/hello.jar
                 main: Hello
                 runtime: random
+            helloworlddotnet22-with-swift-explicit-runtime:
+                function: src/helloDotNet.zip
+                main: 
Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main
+                runtime: swift:3.1.1
diff --git a/tests/src/integration/runtimetests/src/helloDotNet.src.zip 
b/tests/src/integration/runtimetests/src/helloDotNet.src.zip
new file mode 100644
index 0000000..02fc597
Binary files /dev/null and 
b/tests/src/integration/runtimetests/src/helloDotNet.src.zip differ
diff --git a/tests/src/integration/runtimetests/src/helloDotNet.zip 
b/tests/src/integration/runtimetests/src/helloDotNet.zip
new file mode 100644
index 0000000..bcf8865
Binary files /dev/null and 
b/tests/src/integration/runtimetests/src/helloDotNet.zip differ

Reply via email to