mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
FROM squidex/dotnet:2.2-sdk-chromium-phantomjs-node as builder
|
|
|
|
ARG SQUIDEX__VERSION=1.0.0
|
|
|
|
WORKDIR /src
|
|
|
|
# Copy Node project files.
|
|
COPY src/Squidex/package*.json /tmp/
|
|
|
|
# Install Node packages
|
|
RUN cd /tmp && npm install --loglevel=error
|
|
|
|
# Copy Dotnet project files.
|
|
COPY /**/**/*.csproj /tmp/
|
|
# Copy nuget.config for package sources.
|
|
COPY NuGet.Config /tmp/
|
|
|
|
# Install Dotnet packages
|
|
RUN bash -c 'pushd /tmp; for p in *.csproj; do dotnet restore $p --verbosity quiet; true; done; popd'
|
|
|
|
COPY . .
|
|
|
|
# Build Frontend
|
|
RUN cp -a /tmp/node_modules src/Squidex/ \
|
|
&& cd src/Squidex \
|
|
&& npm run test:coverage \
|
|
&& npm run build
|
|
|
|
# Test Backend
|
|
RUN dotnet test tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj --filter Category!=Dependencies \
|
|
&& 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
|
|
|
|
# Publish
|
|
RUN dotnet publish src/Squidex/Squidex.csproj --output /out/ --configuration Release -p:version=$SQUIDEX__VERSION
|