Skip to content

Commit 2a78219

Browse files
authored
feat: Migrate monolith to .NET 7 (#29)
1 parent 16eaaba commit 2a78219

File tree

69 files changed

+496
-17623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+496
-17623
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Ship Monolith API to Azure Web App
2+
on:
3+
push:
4+
branches:
5+
- main
6+
env:
7+
AZURE_WEBAPP_NAME: contoso-monolith-api
8+
AZURE_WEBAPP_PACKAGE_PATH: Demo.Monolith.API\publish
9+
CONFIGURATION: Release
10+
DOTNET_CORE_VERSION: 7.x
11+
WORKING_DIRECTORY: src/monolith/Demo.Monolith.API
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup .NET SDK
18+
uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
21+
- name: Restore
22+
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
23+
- name: Build
24+
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
25+
- name: Test
26+
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
27+
- name: Publish
28+
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
29+
- name: Publish Artifacts
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: webapp
33+
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
34+
deploy:
35+
runs-on: windows-latest
36+
needs: build
37+
steps:
38+
- name: Download artifact from build job
39+
uses: actions/download-artifact@v3
40+
with:
41+
name: webapp
42+
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
43+
- name: Deploy to Azure WebApp
44+
uses: azure/webapps-deploy@v2
45+
with:
46+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
47+
publish-profile: ${{ secrets.monolith-publish-profile }}
48+
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Microservices with Azure API Management
2-
Codito, a fictuous company, provides industry-leading APIs to their customers for purchasing Microsoft Products.
2+
Contoso, a fictuous company, provides industry-leading APIs to their customers for purchasing Microsoft Products.
33

44
Learn about their journey where they decompose a monolith into multiple smaller microservices and how they've migrated without downtime by managing API traffic with Azure API Management.
55

6-
- [Meet Codito & Why they are transitioning to microservices](./docs/meet-codito.md)
6+
- [Meet Contoso & Why they are transitioning to microservices](./docs/meet-contoso.md)
77
- [Migrating to Azure Web App for Containers](./docs/migrating-to-web-app-for-containers.md)
88
- [Migrating to Azure Kubernetes Service](./docs/migrating-to-kubernetes.md)
9-
- [Codito Tomorrow](./docs/codito-tomorrow.md)
9+
- [Contoso Tomorrow](./docs/contoso-tomorrow.md)
1010

1111
Curious? [Run it yourself](/deploy) and give it a try!
1212

13-
![Codito](.//media/codito.jpg)
13+
![](./media/contoso.jpg)

deploy/api-management/dev-portal/404/index.html

Lines changed: 0 additions & 260 deletions
This file was deleted.

deploy/api-management/dev-portal/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

deploy/api-management/dev-portal/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)