Skip to content

Commit 1fa70f6

Browse files
shawnallen85rabbah
authored andcommitted
Migrate .NET 3.0 to .NET 3.1 (#30)
* .NET Core 3.0 support * Updated .NET Core 2.2 project references Updated .NET Core 2.2 Dockerfile to reference latest MS images Migrated Quick Starts to individual projects Moved shared test code to shared folder for reducing duplications * .NET Core 2.2 quickstart update for JSON reference * Removed trailing whitespace Removed trailing whitespace * Travis updates Updating to xenial; dotnet sdk 3.0 install * Download correct dpkg for .NET Core on 16.04 Didn't update it, still referenced 14.04 dpkg * Scala formatting Updated to match expected formatting of file ... note for self: `gradlew scalafmtAll` * CHANGELOG Updates Updated to reflect appropriate release and release status. * .NET 3.0 to .NET 3.1 .NET 3.0 to .NET 3.1 * Scala Tests Fixed test class names; added additional test for 3.1 runtime to test 2.2 project
1 parent 2256a80 commit 1fa70f6

27 files changed

Lines changed: 256 additions & 31 deletions

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ deploy:
4141
all_branches: true
4242
repo: apache/openwhisk-runtime-dotnet
4343
- provider: script
44-
script: "./tools/travis/publish.sh openwhisk 2.2 nightly && ./tools/travis/publish.sh openwhisk 3.0 nightly"
44+
script: "./tools/travis/publish.sh openwhisk 2.2 nightly && ./tools/travis/publish.sh openwhisk 3.1 nightly"
4545
on:
4646
branch: master
4747
repo: apache/openwhisk-runtime-dotnet

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
## Changelogs
2626

2727
- [.NET Core 2.2 CHANGELOG.md](core/dotnet2.2/CHANGELOG.md)
28-
- [.NET Core 3.0 CHANGELOG.md](core/dotnet3.0/CHANGELOG.md)
28+
- [.NET Core 3.1 CHANGELOG.md](core/dotnet3.1/CHANGELOG.md)
2929

3030
## Quick Start Guides
3131

3232
- [.NET Core 2.2](core/dotnet2.2/QUICKSTART.md)
33-
- [.NET Core 3.0](core/dotnet3.0/QUICKSTART.md)
33+
- [.NET Core 3.1](core/dotnet3.1/QUICKSTART.md)
3434

3535
# License
3636

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#
1818
-->
1919

20-
# .NET Core 3.0 OpenWhisk Runtime Container
20+
# .NET Core 3.1 OpenWhisk Runtime Container
2121

2222

2323
## Release TBD
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18-
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-alpine AS build
18+
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
1919

2020
WORKDIR /app
2121
COPY proxy/Apache.OpenWhisk.Runtime.Common/*.csproj ./Apache.OpenWhisk.Runtime.Common/
@@ -26,9 +26,9 @@ RUN dotnet restore
2626
COPY proxy/Apache.OpenWhisk.Runtime.Common/. ./Apache.OpenWhisk.Runtime.Common/
2727
COPY proxy/Apache.OpenWhisk.Runtime.Dotnet.Minimal/. ./Apache.OpenWhisk.Runtime.Dotnet.Minimal/
2828
WORKDIR /app/Apache.OpenWhisk.Runtime.Dotnet.Minimal
29-
RUN dotnet publish -c Release -r alpine.3.9-x64 -o out
29+
RUN dotnet publish -c Release -r linux-musl-x64 -o out
3030

31-
FROM mcr.microsoft.com/dotnet/core/runtime:3.0-alpine AS runtime
31+
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-alpine AS runtime
3232
WORKDIR /app
3333
COPY --from=build /app/Apache.OpenWhisk.Runtime.Dotnet.Minimal/out ./
3434
ENV ASPNETCORE_URLS http://+:8080
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#
1818
-->
1919

20-
# Quick .NET Core 3.0 Action
20+
# Quick .NET Core 3.1 Action
2121

2222
A .NET Core action is a .NET Core class library with a method called `Main` that has the exact signature as follows:
2323

@@ -87,7 +87,7 @@ The value for `main` needs to be in the following format:
8787
To use on a deployment of OpenWhisk that contains the runtime as a kind:
8888

8989
```bash
90-
wsk action update helloDotNet helloDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main --kind dotnet:3.0
90+
wsk action update helloDotNet helloDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main --kind dotnet:3.1
9191
```
9292

9393
## Invoke the .NET Core Action
@@ -107,19 +107,19 @@ wsk action invoke --result helloDotNet --param name World
107107
## Local Development
108108

109109
```bash
110-
./gradlew core:dotnet3.0:distDocker
110+
./gradlew core:dotnet3.1:distDocker
111111
```
112112

113-
This will produce the image `whisk/action-dotnet-v3.0`
113+
This will produce the image `whisk/action-dotnet-v3.1`
114114

115115
Build and Push image
116116

117117
```bash
118118
docker login
119-
./gradlew core:action-dotnet-v3.0:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
119+
./gradlew core:action-dotnet-v3.1:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
120120
```
121121

122-
Deploy OpenWhisk using ansible environment that contains the kind `dotnet:3.0`
122+
Deploy OpenWhisk using ansible environment that contains the kind `dotnet:3.1`
123123
Assuming you have OpenWhisk already deploy localy and `OPENWHISK_HOME` pointing to root directory of OpenWhisk core repository.
124124

125125
Set `ROOTDIR` to the root directory of this repository.
@@ -162,7 +162,7 @@ Using gradle to run all tests
162162
Using gradle to run some tests
163163

164164
```bash
165-
./gradlew :tests:test --tests DotNet3_0ActionContainerTests
165+
./gradlew :tests:test --tests DotNet3_1ActionContainerTests
166166
```
167167

168168
Using IntelliJ:
@@ -175,14 +175,14 @@ Using IntelliJ:
175175
To use as docker action push to your own dockerhub account
176176

177177
```bash
178-
docker tag whisk/action-dotnet-v3.0 $user_prefix/action-dotnet-v3.0
179-
docker push $user_prefix/action-dotnet-v3.0
178+
docker tag whisk/action-dotnet-v3.1 $user_prefix/action-dotnet-v3.1
179+
docker push $user_prefix/action-dotnet-v3.1
180180
```
181181

182182
Then create the action using your the image from dockerhub
183183

184184
```bash
185-
wsk action update helloDotNet helloDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main --docker $user_prefix/action-dotnet-v3.0
185+
wsk action update helloDotNet helloDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main --docker $user_prefix/action-dotnet-v3.1
186186
```
187187

188188
The `$user_prefix` is usually your dockerhub user id.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
ext.dockerImageName = 'action-dotnet-v3.0'
18+
ext.dockerImageName = 'action-dotnet-v3.1'
1919

2020
apply from: '../../gradle/docker.gradle'

core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Apache.OpenWhisk.Runtime.Common.csproj renamed to core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Apache.OpenWhisk.Runtime.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Project Sdk="Microsoft.NET.Sdk">
1818

1919
<PropertyGroup>
20-
<TargetFramework>netcoreapp3.0</TargetFramework>
20+
<TargetFramework>netcoreapp3.1</TargetFramework>
2121
</PropertyGroup>
2222

2323
<ItemGroup>

core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/HttpResponseExtension.cs renamed to core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/HttpResponseExtension.cs

File renamed without changes.

core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs renamed to core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs

File renamed without changes.

core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Run.cs renamed to core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Run.cs

File renamed without changes.

0 commit comments

Comments
 (0)