Browse Source
Merge pull request #366 from Squidex/build-improvements
Build improvements.
pull/378/head
Sebastian Stehle
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
20 additions and
13 deletions
-
.drone.yml
-
.testrunsettings
-
Dockerfile
-
Dockerfile.build
|
|
|
@ -12,6 +12,8 @@ steps: |
|
|
|
path: /var/run/docker.sock |
|
|
|
- name: docker2 |
|
|
|
path: /var/lib/docker |
|
|
|
- name: nuget |
|
|
|
path: /root/.nuget/packages |
|
|
|
when: |
|
|
|
event: |
|
|
|
- pull_request |
|
|
|
@ -28,6 +30,8 @@ steps: |
|
|
|
path: /var/run/docker.sock |
|
|
|
- name: docker2 |
|
|
|
path: /var/lib/docker |
|
|
|
- name: nuget |
|
|
|
path: /root/.nuget/packages |
|
|
|
environment: |
|
|
|
DOCKER_USERNAME: |
|
|
|
from_secret: DOCKER_USERNAME |
|
|
|
@ -51,6 +55,8 @@ steps: |
|
|
|
path: /var/run/docker.sock |
|
|
|
- name: docker2 |
|
|
|
path: /var/lib/docker |
|
|
|
- name: nuget |
|
|
|
path: /root/.nuget/packages |
|
|
|
environment: |
|
|
|
DOCKER_USERNAME: |
|
|
|
from_secret: DOCKER_USERNAME |
|
|
|
@ -73,6 +79,8 @@ steps: |
|
|
|
path: /var/run/docker.sock |
|
|
|
- name: docker2 |
|
|
|
path: /var/lib/docker |
|
|
|
- name: nuget |
|
|
|
path: /root/.nuget/packages |
|
|
|
when: |
|
|
|
event: |
|
|
|
- tag |
|
|
|
@ -154,4 +162,7 @@ volumes: |
|
|
|
path: /var/run/docker.sock |
|
|
|
- name: docker2 |
|
|
|
host: |
|
|
|
path: /var/lib/docker |
|
|
|
path: /var/lib/docker |
|
|
|
- name: nuget |
|
|
|
host: |
|
|
|
path: /var/lib/nuget |
|
|
|
@ -0,0 +1,6 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<RunSettings> |
|
|
|
<RunConfiguration> |
|
|
|
<MaxCpuCount>4</MaxCpuCount> |
|
|
|
</RunConfiguration> |
|
|
|
</RunSettings> |
|
|
|
@ -19,12 +19,7 @@ RUN cp -a /tmp/node_modules src/Squidex/ \ |
|
|
|
&& npm run build |
|
|
|
|
|
|
|
# Test Backend |
|
|
|
RUN dotnet restore \ |
|
|
|
&& dotnet test --filter Category!=Dependencies tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj |
|
|
|
RUN dotnet restore && dotnet test -s ../../.testrunsettings --filter Category!=Dependencies |
|
|
|
|
|
|
|
# Publish |
|
|
|
RUN dotnet publish src/Squidex/Squidex.csproj --output /out/alpine --configuration Release -r alpine.3.7-x64 |
|
|
|
|
|
|
|
@ -16,12 +16,7 @@ RUN cp -a /tmp/node_modules src/Squidex/ \ |
|
|
|
&& npm run build |
|
|
|
|
|
|
|
# Test Backend |
|
|
|
RUN dotnet restore \ |
|
|
|
&& dotnet test --filter Category!=Dependencies tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj \ |
|
|
|
&& dotnet test tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj |
|
|
|
RUN dotnet restore && dotnet test -s ../../.testrunsettings --filter Category!=Dependencies |
|
|
|
|
|
|
|
# Publish |
|
|
|
RUN dotnet publish src/Squidex/Squidex.csproj --output /out/ --configuration Release |