csantanapr closed pull request #1019: Add support for .Net dotnet:2.2 action kind URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/1019
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/runtimes/runtimes.go b/runtimes/runtimes.go index 73779e42..ecd3dd4b 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 13ee8955..b13735ce 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 | | swift@4.1 | swift | openwhisk/action-swift-v4.1:latest | Latest Swift 4.1 language runtime | | swift@3.1.1 | swift | openwhisk/action-swift-v3.1.1:latest | Latest Swift 3.1.1 language runtime | +| dotnet, dotnet@2.2 | 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 32bebf20..5064ec6c 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 00000000..02fc597a 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 00000000..bcf88650 Binary files /dev/null and b/tests/src/integration/runtimetests/src/helloDotNet.zip differ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services