Skip to content

Commit

Permalink
Merge remote-tracking branch 'tmp/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Dec 1, 2023
2 parents de3fb60 + 9ee096f commit 105a54f
Show file tree
Hide file tree
Showing 62 changed files with 273 additions and 298 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/markdownlint-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
26 changes: 26 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Markdownlint

permissions:
contents: read

# run even on changes without markdown changes, so that we can
# make it in GitHub a required check for PR's
on:
pull_request:

jobs:
lint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Run Markdownlint
run: |
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
npm i -g markdownlint-cli
markdownlint --ignore '.dotnet/' '**/*.md'
29 changes: 29 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: eShop Pull Request Validation

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- main
paths-ignore:
- '**.md'


jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET (global.json)
uses: actions/setup-dotnet@v3
- name: Update Workloads
run: dotnet workload update
- name: Install Workloads
run: dotnet workload install aspire
- name: Build
run: dotnet build eShop.Web.slnf
- name: Test
run: dotnet test eShop.Web.slnf
20 changes: 20 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"default": true,
"ul-indent": false,
"ul-style": false,
"no-trailing-spaces": false,
"line-length": false,
"blanks-around-headings": false,
"no-duplicate-heading": { "siblings_only": true },
"no-trailing-punctuation": false,
"blanks-around-fences": false,
"blanks-around-lists": false,
"no-inline-html": { "allowed_elements": [ "summary", "details", "kbd", "br" ]},
"no-bare-urls": false,
"single-trailing-newline": false,
"emphasis-style": false,

// rule settings and options are documented in https:/DavidAnson/markdownlint
// feel free to disable more low value rules in here; get rule name from the error message.
// the purpose of the linter is to catch significant issues like broken links.
}
2 changes: 2 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This is for editors; keep .github/workflows/markdownlint.yml in sync
.dotnet/
37 changes: 9 additions & 28 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<AspnetVersion>8.0.0</AspnetVersion>
<MicrosoftExtensionsVersion>8.0.0</MicrosoftExtensionsVersion>
<EfVersion>8.0.0</EfVersion>
<RuntimeVersion>8.0.0</RuntimeVersion>
<AspireVersion>8.0.0-preview.1.23557.2</AspireVersion>
<GrpcVersion>2.59.0-pre1</GrpcVersion>
<GrpcVersion>2.59.0</GrpcVersion>
</PropertyGroup>
<ItemGroup>
<!-- Version together with Aspire -->
Expand All @@ -16,51 +17,36 @@
<PackageVersion Include="Aspire.Npgsql" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(AspireVersion)" />
<PackageVersion Include="Aspire.StackExchange.Redis" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery.Abstractions" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery.Yarp" Version="$(AspireVersion)" />
<!-- Version together with ASP.NET -->
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0-rc.2.23480.2" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.0.0-rtm.23524.3" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="$(MicrosoftExtensionsVersion)" />
<!-- Version together with EF -->
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="$(EfVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="$(EfVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(EfVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="$(EfVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="$(EfVersion)" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0-rc.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="$(EfVersion)" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.15" />
<PackageVersion Include="Pgvector" Version="0.2.0-rc.2" />
<PackageVersion Include="Pgvector.EntityFrameworkCore" Version="0.2.0-rc.1" />
<!-- Version together with runtime -->
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(RuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(RuntimeVersion)" />
<!-- Xabaril packages -->
<PackageVersion Include="AspNetCore.HealthChecks.NpgSql" Version="7.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.UI" Version="7.0.2" />
<PackageVersion Include="AspNetCore.HealthChecks.UI.Client" Version="7.1.0" />
<PackageVersion Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="7.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Uris" Version="7.0.0" />
<!-- AI -->
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.8" />
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.0.0-beta4" />
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.0.0-beta8" />
<!-- Open Telemetry -->
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
Expand All @@ -76,7 +62,6 @@
<!-- Grpc -->
<PackageVersion Include="Grpc.AspNetCore" Version="$(GrpcVersion)" />
<PackageVersion Include="Grpc.AspNetCore.Server.ClientFactory" Version="$(GrpcVersion)" />
<PackageVersion Include="Grpc.Net.Client" Version="$(GrpcVersion)" />
<PackageVersion Include="Grpc.Tools" Version="2.59.0" PrivateAssets="All" />
<!-- Azure -->
<PackageVersion Include="AspNetCore.HealthChecks.AzureServiceBus" Version="7.0.0" />
Expand All @@ -85,19 +70,15 @@
<PackageVersion Include="Microsoft.Identity.Web" Version="2.15.3" />
<!-- Miscellaneous -->
<PackageVersion Include="Automapper" Version="12.0.1" />
<PackageVersion Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageVersion Include="Dapper" Version="2.0.151" />
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageVersion Include="Google.Protobuf" Version="3.24.3" />
<PackageVersion Include="KubernetesClient" Version="11.0.44" />
<PackageVersion Include="MediatR" Version="12.1.1" />
<PackageVersion Include="MediatR" Version="12.2.0" />
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
<PackageVersion Include="Polly" Version="8.0.0" />
<PackageVersion Include="Polly" Version="8.2.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="Npgsql" Version="8.0.0-rc.2" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageVersion Include="xunit" Version="2.5.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.1" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0-preview.1.23556.5" />
</ItemGroup>
</Project>
</Project>
56 changes: 0 additions & 56 deletions NuGet.config

This file was deleted.

22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,31 @@ A reference .NET application implementing an eCommerce web site using a services
- During installation, ensure that the following are selected:
- `ASP.NET and web development` workload.
- `.NET Aspire SDK` component in `Individual components`.
- Install & start Docker Desktop: https://docs.docker.com/engine/install/
- Install the latest [.NET 8 SDK](https:/dotnet/installer#installers-and-binaries)

### Running the solution

Running eShop requires a dependency on .NET Aspire. To learn more about .NET Aspire, read [the official documentation](https://aka.ms/dotnet/aspire/docs).

- On Mac/Linux (or if not using Visual Studio), install the Aspire workload with the following commands:
```powershell
dotnet workload update --skip-sign-check --interactive
dotnet workload install aspire --skip-sign-check --interactive
dotnet workload update
dotnet workload install aspire
dotnet restore eShop.Web.slnf
```
- Install & start Docker Desktop: https://docs.docker.com/engine/install/

### Running the solution

> [!WARNING]
> Remember to ensure that Docker is started
* (Windows only) Run the application from Visual Studio:
* Open the `eShop.Web.slnf` file in Visual Studio
* Ensure that `eShop.AppHost.csproj` is your startup project
* Hit Ctrl-F5 to launch Aspire
- Open the `eShop.Web.slnf` file in Visual Studio
- Ensure that `eShop.AppHost.csproj` is your startup project
- Hit Ctrl-F5 to launch Aspire

* Or run the application from your terminal:
```powershell
dotnet run --project src/eShop.AppHost/eShop.AppHost.csproj
```
then look for lines like this in the console output in order to find the URL to open the Aspire dashboard:
```
```sh
Now listening on: http://localhost:18848
```

Expand Down
4 changes: 2 additions & 2 deletions build/acr-build/queue-all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ $services = @(
@{ Name="eshopcatalog"; Image="eshop/catalog.api"; File="src/Services/Catalog/Catalog.API/Dockerfile" },
@{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" },
@{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" },
@{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" },
@{ Name="eshoporderingbg"; Image="eshop/orderprocessor"; File="src/Services/Ordering/OrderProcessor/Dockerfile" },
@{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" },
@{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" },
@{ Name="eshopwebstatus"; Image="eshop/webstatus"; File="src/Web/WebStatus/Dockerfile" },
@{ Name="eshoppayment"; Image="eshop/payment.api"; File="src/Services/Payment/Payment.API/Dockerfile" },
@{ Name="eshoppayment"; Image="eshop/paymentprocessor"; File="src/Services/Payment/PaymentProcessor/Dockerfile" },
@{ Name="eshopocelotapigw"; Image="eshop/ocelotapigw"; File="src/ApiGateways/ApiGw-Base/Dockerfile" },
@{ Name="eshopmobileshoppingagg"; Image="eshop/mobileshoppingagg"; File="src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile" },
@{ Name="eshopwebshoppingagg"; Image="eshop/webshoppingagg"; File="src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile" },
Expand Down
2 changes: 1 addition & 1 deletion build/multiarch-manifests/create-manifests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-la
Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow


$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "payment.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "orderprocessor", "paymentprocessor", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"

foreach ($svc in $services) {
Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev"
Expand Down
5 changes: 2 additions & 3 deletions eShop.Web.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
"src\\Catalog.API\\Catalog.API.csproj",
"src\\EventBusServiceBus\\EventBusServiceBus.csproj",
"src\\EventBus\\EventBus.csproj",
"src\\Identity.API\\Identity.API.csproj",
"src\\IntegrationEventLogEF\\IntegrationEventLogEF.csproj",
"src\\Mobile.Bff.Shopping\\Mobile.Bff.Shopping.csproj",
"src\\Ordering.API\\Ordering.API.csproj",
"src\\Ordering.BackgroundTasks\\Ordering.BackgroundTasks.csproj",
"src\\OrderProcessor\\OrderProcessor.csproj",
"src\\Ordering.Domain\\Ordering.Domain.csproj",
"src\\Ordering.Infrastructure\\Ordering.Infrastructure.csproj",
"src\\Payment.API\\Payment.API.csproj",
"src\\PaymentProcessor\\PaymentProcessor.csproj",
"src\\WebAppComponents\\WebAppComponents.csproj",
"src\\WebApp\\WebApp.csproj",
"src\\WebhookClient\\WebhookClient.csproj",
Expand Down
4 changes: 2 additions & 2 deletions eShop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Bff.Shopping", "src\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.API", "src\Ordering.API\Ordering.API.csproj", "{C8BA83CE-480E-4CC7-9508-747A76671F63}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "src\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{0E5BE4C6-BF24-4BDA-908F-EFB99D22159D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrderProcessor", "src\OrderProcessor\OrderProcessor.csproj", "{0E5BE4C6-BF24-4BDA-908F-EFB99D22159D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Domain", "src\Ordering.Domain\Ordering.Domain.csproj", "{DCA3AE8C-904C-48A6-BC0C-2CF995DDFD99}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "src\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{75474943-A318-4DF0-AB01-04F752827152}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Payment.API\Payment.API.csproj", "{A2369111-2D88-4612-BFD2-9BEA0CB6D37E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PaymentProcessor", "src\PaymentProcessor\PaymentProcessor.csproj", "{A2369111-2D88-4612-BFD2-9BEA0CB6D37E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApp", "src\WebApp\WebApp.csproj", "{BE636956-26D5-404D-B269-17800032625D}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100-rtm.23530.12",
"version": "8.0.100",
"rollForward": "latestPatch",
"allowPrerelease": true
}
Expand Down
8 changes: 8 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
7 changes: 0 additions & 7 deletions src/Basket.API/README.md

This file was deleted.

Loading

0 comments on commit 105a54f

Please sign in to comment.