-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eyup GEVENIM
committed
Jan 7, 2020
1 parent
9b72b11
commit 7f54ca5
Showing
20 changed files
with
270 additions
and
9 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,3 @@ | ||
REGISTRY=blog-api | ||
PLATFORM=linux | ||
TAG=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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
/**/obj | ||
|
||
/**/*.csproj.user | ||
|
||
/tests-results |
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,36 @@ | ||
version: '3.4' | ||
|
||
# docker-compose -f docker-compose-tests.yml -f docker-compose-tests.override.yml up --build | ||
|
||
services: | ||
sql-data-test: | ||
environment: | ||
- SA_PASSWORD=Pass@word | ||
- ACCEPT_EULA=Y | ||
ports: | ||
- "5433:1433" | ||
|
||
blog-api-integration-test: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- ASPNETCORE_URLS=http://0.0.0.0:80 | ||
- ConnectionStrings:DefaultConnection=${BLOG_API_TEST_DB:-Server=sql-data-test;Database=blog_api_test_db;User Id=sa;Password=Pass@word} | ||
ports: | ||
- "5101:80" | ||
entrypoint: | ||
- dotnet | ||
- test | ||
- --logger | ||
- trx;LogFileName=/tests/blog-api-integration-test-results.xml | ||
|
||
blog-services-test: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- ASPNETCORE_URLS=http://0.0.0.0:80 | ||
ports: | ||
- "5102:80" | ||
entrypoint: | ||
- dotnet | ||
- test | ||
- --logger | ||
- trx;LogFileName=/tests/blog-services-test-results.xml |
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,27 @@ | ||
version: '3.4' | ||
|
||
# docker-compose -f docker-compose-tests.yml -f docker-compose-tests.override.yml up --build | ||
|
||
services: | ||
sql-data-test: | ||
image: mcr.microsoft.com/mssql/server:2017-latest | ||
|
||
blog-api-integration-test: | ||
image: ${REGISTRY:-test}/blog-api-integration-test:${TAG:-latest} | ||
build: | ||
context: . | ||
dockerfile: src/Tests/Blog.API.IntegrationTests/Dockerfile | ||
target: integrationtest | ||
volumes: | ||
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests | ||
depends_on: | ||
- sql-data-test | ||
|
||
blog-services-test: | ||
image: '${REGISTRY:-test}/blog-services-test:${TAG:-latest}' | ||
build: | ||
context: . | ||
dockerfile: src/Tests/Blog.Services.Tests/Dockerfile | ||
target: servicestest | ||
volumes: | ||
- ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests |
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,20 @@ | ||
version: '3.4' | ||
|
||
# You need to start it with the following CLI command: | ||
# docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build | ||
|
||
services: | ||
sqldata: | ||
environment: | ||
- SA_PASSWORD=Pass@word | ||
- ACCEPT_EULA=Y | ||
ports: | ||
- '5433:1433' | ||
|
||
blog.api: | ||
environment: | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- ASPNETCORE_URLS=http://0.0.0.0:80 | ||
- ConnectionStrings:DefaultConnection=${BLOG_API_DB:-Server=sqldata;Database=blog_api_db;User Id=sa;Password=Pass@word} | ||
ports: | ||
- '5100:80' |
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,16 @@ | ||
version: '3.4' | ||
|
||
# You need to start it with the following CLI command: | ||
# docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build | ||
|
||
services: | ||
sqldata: | ||
image: 'mcr.microsoft.com/mssql/server:2017-latest' | ||
|
||
blog.api: | ||
image: '${REGISTRY:-mp}/blog.api:${PLATFORM:-linux}-${TAG:-latest}' | ||
build: | ||
context: . | ||
dockerfile: src/Presentation/Blog.API/Dockerfile | ||
depends_on: | ||
- sqldata |
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 @@ | ||
docker-compose -f .\docker-compose-tests.yml -f .\docker-compose-tests.override.yml up |
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,34 @@ | ||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
|
||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build | ||
WORKDIR /src | ||
|
||
COPY ["Blog.sln", "."] | ||
COPY ["src/Presentation/Blog.API/Blog.API.csproj", "src/Presentation/Blog.API/"] | ||
COPY ["src/Presentation/Blog.API/Blog.API.xml", "src/Presentation/Blog.API/"] | ||
COPY ["src/Libraries/Blog.Data/Blog.Data.csproj", "src/Libraries/Blog.Data/"] | ||
COPY ["src/Libraries/Blog.Core/Blog.Core.csproj", "src/Libraries/Blog.Core/"] | ||
COPY ["src/Libraries/Blog.Services/Blog.Services.csproj", "src/Libraries/Blog.Services/"] | ||
#COPY ["src/Tests/Blog.Services.Tests.csproj", "src/Tests/Blog.Services.Tests/"] | ||
#COPY ["src/Tests/Blog.API.IntegrationTests.csproj", "src/Tests/Blog.API.IntegrationTests/"] | ||
RUN dotnet restore "src/Presentation/Blog.API/Blog.API.csproj" | ||
#RUN dotnet restore "Blog.sln" | ||
COPY . . | ||
WORKDIR "/src/src/Presentation/Blog.API" | ||
RUN dotnet build "Blog.API.csproj" -c Release -o /app/build | ||
|
||
#FROM build as servicestest | ||
#WORKDIR "/src/src/Tests/Blog.Services.Tests" | ||
|
||
#FROM build as integrationtest | ||
#WORKDIR "/src/src/Tests/Blog.API.IntegrationTests" | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "Blog.API.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Blog.API.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
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,22 @@ | ||
FROM mcr.microsoft.com/dotnet/core/runtime:3.0-buster-slim AS base | ||
WORKDIR /app | ||
|
||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build | ||
WORKDIR /src | ||
COPY ["src/Tests/Blog.API.IntegrationTests/Blog.API.IntegrationTests.csproj", "src/Tests/Blog.API.IntegrationTests/"] | ||
COPY ["src/Presentation/Blog.API/Blog.API.csproj", "src/Presentation/Blog.API/"] | ||
COPY ["src/Libraries/Blog.Data/Blog.Data.csproj", "src/Libraries/Blog.Data/"] | ||
COPY ["src/Libraries/Blog.Core/Blog.Core.csproj", "src/Libraries/Blog.Core/"] | ||
COPY ["src/Libraries/Blog.Services/Blog.Services.csproj", "src/Libraries/Blog.Services/"] | ||
RUN dotnet restore "src/Tests/Blog.API.IntegrationTests/Blog.API.IntegrationTests.csproj" | ||
COPY . . | ||
WORKDIR "/src/src/Tests/Blog.API.IntegrationTests" | ||
RUN dotnet build "Blog.API.IntegrationTests.csproj" -c Release -o /app/build | ||
|
||
FROM build as integrationtest | ||
WORKDIR "/src/src/Tests/Blog.API.IntegrationTests" | ||
|
||
#FROM base AS final | ||
#WORKDIR /app | ||
#COPY --from=publish /app/publish . | ||
#ENTRYPOINT ["dotnet", "Blog.API.IntegrationTests.dll"] |
10 changes: 10 additions & 0 deletions
10
src/Tests/Blog.API.IntegrationTests/Properties/launchSettings.json
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,10 @@ | ||
{ | ||
"profiles": { | ||
"Blog.API.IntegrationTests": { | ||
"commandName": "Project" | ||
}, | ||
"Docker": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |
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,21 @@ | ||
FROM mcr.microsoft.com/dotnet/core/runtime:3.0-buster-slim AS base | ||
WORKDIR /app | ||
|
||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build | ||
WORKDIR /src | ||
COPY ["src/Tests/Blog.Services.Tests/Blog.Services.Tests.csproj", "src/Tests/Blog.Services.Tests/"] | ||
COPY ["src/Libraries/Blog.Data/Blog.Data.csproj", "src/Libraries/Blog.Data/"] | ||
COPY ["src/Libraries/Blog.Core/Blog.Core.csproj", "src/Libraries/Blog.Core/"] | ||
COPY ["src/Libraries/Blog.Services/Blog.Services.csproj", "src/Libraries/Blog.Services/"] | ||
RUN dotnet restore "src/Tests/Blog.Services.Tests/Blog.Services.Tests.csproj" | ||
COPY . . | ||
WORKDIR "/src/src/Tests/Blog.Services.Tests" | ||
RUN dotnet build "Blog.Services.Tests.csproj" -c Release -o /app/build | ||
|
||
FROM build as servicestest | ||
WORKDIR "/src/src/Tests/Blog.Services.Tests" | ||
|
||
#FROM base AS final | ||
#WORKDIR /app | ||
#COPY --from=publish /app/publish . | ||
#ENTRYPOINT ["dotnet", "Blog.Services.Tests.dll"] |
10 changes: 10 additions & 0 deletions
10
src/Tests/Blog.Services.Tests/Properties/launchSettings.json
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,10 @@ | ||
{ | ||
"profiles": { | ||
"Blog.Services.Tests": { | ||
"commandName": "Project" | ||
}, | ||
"Docker": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |