forked from SteveSandersonMS/CarChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding CI and fixing up a readme (#1)
* Adding some initial deploy assets * modifying readme and package ref for validation * Attempting to fix arm location ***NO_CI*** * Adding back location * Fixing deploy template
- Loading branch information
Showing
9 changed files
with
216 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extensions": [ | ||
"ms-vscode.csharp", | ||
"formulahendry.dotnet-test-explorer" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Blazor App | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.300 | ||
|
||
- name: Restore | ||
run: dotnet restore | ||
|
||
- name: Build with dotnet | ||
run: dotnet build --configuration Release --no-restore | ||
|
||
- name: Publish with dotnet | ||
run: dotnet publish --configuration Release -o published_app --no-build | ||
|
||
- name: Publish artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: webapp | ||
path: published_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
// Use IntelliSense to find out which attributes exist for C# debugging | ||
// Use hover for the description of the existing attributes | ||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": ".NET Core Launch (Blazor Standalone)", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"program": "dotnet", | ||
"args": ["run"], | ||
"cwd": "${workspaceFolder}/Server", | ||
"env": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
{ | ||
"name": ".NET Core Debug Blazor Web Assembly in Chrome", | ||
"type": "pwa-chrome", | ||
"request": "launch", | ||
"timeout": 30000, | ||
// If you have changed the default port / launch URL make sure to update the expectation below | ||
"url": "https://localhost:5001", | ||
"webRoot": "${workspaceFolder}/Server", | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/Server/CarChecker.Server.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "publish", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"publish", | ||
"${workspaceFolder}/Server/CarChecker.Server.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "watch", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"watch", | ||
"run", | ||
"${workspaceFolder}/Server/CarChecker.Server.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CarChecker - a Blazor sample app | ||
This is a sample application for [Blazor](https://blazor.net) which was presented at Build 2020. You can view the on-demand walk-through for this on Channel 9: [Modern Web UI with Blazor WebAssembly](https://aka.ms/blazor-in-action). | ||
|
||
To use this it's best to have Visual Studio 2019 and the latest .NET SDK for the Blazor release which you can read about here: [Blazor WebAssembly 3.2.0 now available](https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/). | ||
|
||
## What this sample has: | ||
This is a great sample which has a lot of Blazor + ASP.NET integrations such as: | ||
- client-side debugging with Visual Studio | ||
- Authentication / Authorization | ||
- input validation | ||
- data integration/sync | ||
- Blazor components | ||
- code sharing | ||
- JavaScript interop | ||
- Localization / internationalization | ||
- Progressive Web App (PWA) | ||
|
||
## Deploy to Azure | ||
You can create the resource (Free SKU App Service) in Azure quickly by clicking below and then can use Visual Studio to select the App Service and deploy the code to it later. | ||
|
||
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Ftimheuer%2FCarChecker%2Fmaster%2Fdeploy.json) | ||
|
||
### Remarks | ||
This sample makes use of a preview package for Validation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"webAppName": { | ||
"type": "string", | ||
"defaultValue": "[concat('BlazorApp-', uniqueString(resourceGroup().id))]", | ||
"metadata":{ | ||
"description": "That name is the name of our application. It has to be unique. Type a name followed by your resource group name. (<name>-<resourceGroupName>)" | ||
} | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]", | ||
"metadata":{ | ||
"description": "Location for all resources." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"alwaysOn": false, | ||
"sku": "Free", | ||
"skuCode": "F1", | ||
"workerSize": "0", | ||
"workerSizeId": 0, | ||
"numberOfWorkers": "1", | ||
"currentStack": "dotnetcore", | ||
"netFrameworkVersion": "v4.0", | ||
"hostingPlanName": "[concat('hpn-', resourceGroup().name)]" | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2018-02-01", | ||
"name": "[parameters('webAppName')]", | ||
"type": "Microsoft.Web/sites", | ||
"location": "[parameters('location')]", | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]" | ||
], | ||
"properties": { | ||
"name": "[parameters('webAppName')]", | ||
"siteConfig": { | ||
"metadata": [ | ||
{ | ||
"name": "CURRENT_STACK", | ||
"value": "[variables('currentStack')]" | ||
} | ||
], | ||
"netFrameworkVersion": "[variables('netFrameworkVersion')]", | ||
"alwaysOn": "[variables('alwaysOn')]" | ||
}, | ||
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]", | ||
"clientAffinityEnabled": true | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2018-02-01", | ||
"name": "[variables('hostingPlanName')]", | ||
"type": "Microsoft.Web/serverfarms", | ||
"location": "[parameters('location')]", | ||
"properties": { | ||
"name": "[variables('hostingPlanName')]", | ||
"workerSize": "[variables('workerSize')]", | ||
"workerSizeId": "[variables('workerSizeId')]", | ||
"numberOfWorkers": "[variables('numberOfWorkers')]" | ||
}, | ||
"sku": { | ||
"Tier": "[variables('sku')]", | ||
"Name": "[variables('skuCode')]" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"webAppName": { | ||
"value": "GEN-UNIQUE" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.