Commit f1c8a4d1 authored by Jason Ouellet's avatar Jason Ouellet
parents e5af6162 a7e3cd68
Pipeline #11312 failed with stages
image: microsoft/dotnet:latest
stages:
- build
- test
variables:
test: "tests"
before_script:
- "cd src"
- "dotnet restore"
build:
stage: build
script:
- "dotnet build"
test:
stage: test
script:
- "cd $test"
- "dotnet test"
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /src
COPY ["Here/Here.csproj", "Here/"]
RUN dotnet restore "Here/Here.csproj"
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /
COPY ["src", "/Here"]
COPY ["tests", "/Here"]
COPY ["Here.sln", "/Here"]
RUN dotnet restore
COPY . .
WORKDIR "/src/Here"
RUN dotnet build "Here.csproj" -c Release -o /app/build
RUN dotnet build -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Here.csproj" -c Release -o /app/publish
RUN dotnet publish "Here.API.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Here.dll"]
ENTRYPOINT ["dotnet", "Here.API.dll"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment