forked from swift-conductor/conductor-client-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (28 loc) · 889 Bytes
/
Dockerfile
File metadata and controls
33 lines (28 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS csharp-sdk
RUN mkdir /package
COPY /Conductor /package/Conductor
WORKDIR /package/Conductor
FROM csharp-sdk AS linter
RUN dotnet format --verify-no-changes *.csproj
FROM csharp-sdk AS build
RUN dotnet build *.csproj
FROM build as test
ARG CONDUCTOR_SERVER_URL
ENV CONDUCTOR_SERVER_URL=${CONDUCTOR_SERVER_URL}
COPY /Tests /package/Tests
WORKDIR /package/Tests
RUN dotnet test -l "console;verbosity=normal"
FROM build as pack_release
COPY /README.md /package/swift-conductor-client/README.md
ARG SDK_VERSION
RUN dotnet pack "swift-conductor-client.csproj" \
-o /build \
--include-symbols \
--include-source \
-c Release "/p:Version=${SDK_VERSION}"
FROM pack_release as publish_release
ARG NUGET_SRC
ARG NUGET_API_KEY
RUN dotnet nuget push "/build/*.symbols.nupkg" \
--source "${NUGET_SRC}" \
--api-key "${NUGET_API_KEY}"