From 681ca4eb503fe09221d3fc9084fff1ce59c7b299 Mon Sep 17 00:00:00 2001
From: HueiFeng <695979933@qq.com>
Date: Sat, 29 Aug 2020 20:20:54 +0800
Subject: [PATCH 1/4] Added Dockerfile
---
.dockerignore | 25 ++++++
.../src/EShopSample.Web/Dockerfile | 78 +++++++++++++++++++
.../EShopSample.Web/EShopSample.Web.csproj | 3 +
.../Properties/launchSettings.json | 7 ++
4 files changed, 113 insertions(+)
create mode 100644 .dockerignore
create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..3729ff0c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
new file mode 100644
index 00000000..f150a658
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
@@ -0,0 +1,78 @@
+#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
+WORKDIR /app
+EXPOSE 80
+EXPOSE 443
+
+FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
+WORKDIR /src
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Web/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/"]
+RUN dotnet restore "samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj"
+COPY . .
+WORKDIR "/src/samples/EShopSample/aspnet-core/src/EShopSample.Web"
+RUN dotnet build "EShopSample.Web.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "EShopSample.Web.csproj" -c Release -o /app/publish
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "EShopSample.Web.dll"]
\ No newline at end of file
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
index 4b26b0e3..c6e7868e 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
@@ -13,6 +13,8 @@
false
true
EShopSample-4681b4fd-151f-4221-84a4-929d86723e4c
+ Linux
+ ..\..\..\..\..
@@ -32,6 +34,7 @@
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
index a5a55e40..c0721e7b 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
@@ -22,6 +22,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44340/"
+ },
+ "Docker": {
+ "commandName": "Docker",
+ "launchBrowser": true,
+ "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
+ "publishAllPorts": true,
+ "useSSL": true
}
}
}
\ No newline at end of file
From 4b8353b7c063a8f9a57cb7504766e1e6f558473f Mon Sep 17 00:00:00 2001
From: HueiFeng <695979933@qq.com>
Date: Sat, 29 Aug 2020 22:12:53 +0800
Subject: [PATCH 2/4] Added StopApplication
---
.../EShopSample.DbMigrator/DbMigratorHostedService.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
index fb9c6f4e..b9ba7e43 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
@@ -10,6 +10,13 @@ namespace EShopSample.DbMigrator
{
public class DbMigratorHostedService : IHostedService
{
+ private readonly IHostApplicationLifetime _hostApplicationLifetime;
+
+ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
+ {
+ _hostApplicationLifetime = hostApplicationLifetime;
+ }
+
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create(options =>
@@ -26,6 +33,8 @@ namespace EShopSample.DbMigrator
.MigrateAsync();
application.Shutdown();
+
+ _hostApplicationLifetime.StopApplication();
}
}
From 21e422777b403ba8f469dfcc144b066c99c24a46 Mon Sep 17 00:00:00 2001
From: Huei Feng <695979933@qq.com>
Date: Sat, 29 Aug 2020 22:16:54 +0800
Subject: [PATCH 3/4] Create azure-pipelines.yml
---
azure-pipelines.yml | 88 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
create mode 100644 azure-pipelines.yml
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 00000000..9ec8ebba
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,88 @@
+# ASP.NET Core (.NET Framework)
+# Build and test ASP.NET Core projects targeting the full .NET Framework.
+# Add steps that publish symbols, save build artifacts, and more:
+# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
+
+schedules:
+- cron: "0 */6 * * *"
+ displayName: Daily midnight build
+ branches:
+ include:
+ - master
+ always: true
+
+trigger:
+- master
+
+pool:
+ vmImage: 'ubuntu-latest'
+
+variables:
+ solution: '**/*.sln'
+ buildPlatform: 'Any CPU'
+ buildConfiguration: 'Release'
+
+steps:
+- task: UseDotNet@2
+ inputs:
+ packageType: 'sdk'
+ version: '3.x'
+- task: CmdLine@2
+ displayName: 'install dotnet-ef'
+ inputs:
+ script: 'dotnet tool install -g dotnet-ef'
+
+- task: CmdLine@2
+ inputs:
+ script: |
+ echo commands
+ sed -i '0,/Default[^,]*/s//$(ConnectionStrings)"/g' samples/EShopSample/aspnet-core/src/EShopSample.Web/appsettings.json
+ echo commands executed
+- task: CmdLine@2
+ inputs:
+ script: |
+ echo commands
+ sed -i '0,/Default[^,]*/s//$(ConnectionStrings)"/g' samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/appsettings.json
+ echo commands executed
+- task: DotNetCoreCLI@2
+ displayName: 'restore'
+ inputs:
+ command: 'restore'
+ feedsToUse: 'select'
+
+- task: DotNetCoreCLI@2
+ displayName: 'build'
+ inputs:
+ command: 'build'
+
+- task: CmdLine@2
+ displayName: 'publish'
+ inputs:
+ script: |
+ dotnet publish
+- task: CmdLine@2
+ displayName: 'drop database'
+ inputs:
+ script: |
+ dotnet ef database drop --project samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj -s samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj -f
+
+- task: CmdLine@2
+ displayName: 'update database'
+ inputs:
+ script: |
+ dotnet ef database update --project samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj -s samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
+- task: CmdLine@2
+ inputs:
+ script: |
+ cd samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator
+
+ dotnet run
+- task: Docker@2
+ displayName: 'build and push docker'
+ inputs:
+ containerRegistry: $(DockerRegistry)
+ repository: $(repository)
+ command: 'buildAndPush'
+ Dockerfile: 'samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile'
+ buildContext: .
+ tags: 'latest'
From 1fc0d085eff8b576e7fff058418bc9ae04616a14 Mon Sep 17 00:00:00 2001
From: Huei Feng <695979933@qq.com>
Date: Tue, 1 Sep 2020 11:35:29 +0800
Subject: [PATCH 4/4] Update azure-pipelines.yml for Azure Pipelines
---
azure-pipelines.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9ec8ebba..b4f54742 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -12,8 +12,9 @@ schedules:
always: true
trigger:
-- master
-
+ branches:
+ include:
+ - master
pool:
vmImage: 'ubuntu-latest'