-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
7 changed files
with
169 additions
and
6 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,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 |
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,93 @@ | ||
# 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' sample/MyAbpApp/src/MyAbpApp.Web/appsettings.json | ||
echo commands executed | ||
- task: CmdLine@2 | ||
inputs: | ||
script: | | ||
echo commands | ||
sed -i '0,/Default[^,]*/s//$(ConnectionStrings)"/g' sample/MyAbpApp/src/MyAbpApp.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 sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore.DbMigrations/MyAbpApp.EntityFrameworkCore.DbMigrations.csproj -s sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj -f | ||
- task: CmdLine@2 | ||
displayName: 'update database' | ||
inputs: | ||
script: | | ||
dotnet ef database update --project sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore.DbMigrations/MyAbpApp.EntityFrameworkCore.DbMigrations.csproj -s sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj | ||
- task: CmdLine@2 | ||
inputs: | ||
script: | | ||
cd sample/MyAbpApp/src/MyAbpApp.DbMigrator | ||
dotnet run | ||
- task: Docker@2 | ||
displayName: 'build and push docker' | ||
inputs: | ||
containerRegistry: $(DockerRegistry) | ||
repository: $(repository) | ||
command: 'buildAndPush' | ||
Dockerfile: 'sample/MyAbpApp/src/MyAbpApp.Web/Dockerfile' | ||
buildContext: . | ||
tags: 'latest' |
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,35 @@ | ||
#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 ["sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj", "sample/MyAbpApp/src/MyAbpApp.Web/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.Web/EasyAbp.Abp.SettingUi.Web.csproj", "src/EasyAbp.Abp.SettingUi.Web/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.HttpApi/EasyAbp.Abp.SettingUi.HttpApi.csproj", "src/EasyAbp.Abp.SettingUi.HttpApi/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.Application.Contracts/EasyAbp.Abp.SettingUi.Application.Contracts.csproj", "src/EasyAbp.Abp.SettingUi.Application.Contracts/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.Domain.Shared/EasyAbp.Abp.SettingUi.Domain.Shared.csproj", "src/EasyAbp.Abp.SettingUi.Domain.Shared/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.Application/MyAbpApp.Application.csproj", "sample/MyAbpApp/src/MyAbpApp.Application/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.Application.Contracts/MyAbpApp.Application.Contracts.csproj", "sample/MyAbpApp/src/MyAbpApp.Application.Contracts/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.Domain.Shared/MyAbpApp.Domain.Shared.csproj", "sample/MyAbpApp/src/MyAbpApp.Domain.Shared/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.Application/EasyAbp.Abp.SettingUi.Application.csproj", "src/EasyAbp.Abp.SettingUi.Application/"] | ||
COPY ["src/EasyAbp.Abp.SettingUi.Domain/EasyAbp.Abp.SettingUi.Domain.csproj", "src/EasyAbp.Abp.SettingUi.Domain/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.Domain/MyAbpApp.Domain.csproj", "sample/MyAbpApp/src/MyAbpApp.Domain/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore.DbMigrations/MyAbpApp.EntityFrameworkCore.DbMigrations.csproj", "sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore.DbMigrations/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/MyAbpApp.EntityFrameworkCore.csproj", "sample/MyAbpApp/src/MyAbpApp.EntityFrameworkCore/"] | ||
COPY ["sample/MyAbpApp/src/MyAbpApp.HttpApi/MyAbpApp.HttpApi.csproj", "sample/MyAbpApp/src/MyAbpApp.HttpApi/"] | ||
RUN dotnet restore "sample/MyAbpApp/src/MyAbpApp.Web/MyAbpApp.Web.csproj" | ||
COPY . . | ||
WORKDIR "/src/sample/MyAbpApp/src/MyAbpApp.Web" | ||
RUN dotnet build "MyAbpApp.Web.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "MyAbpApp.Web.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "MyAbpApp.Web.dll"] |
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
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