File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ COPY ["Extensions/", "Extensions/"]
1111
1212# Restore dependencies
1313# Increase the timeout and number of retries for NuGet
14- RUN dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org
14+ RUN dotnet nuget list source | grep -q 'nuget.org' || dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org
1515ENV NUGET_PACKAGES=/nuget-packages
1616ENV NUGET_HTTP_CACHE_PATH=/nuget-http-cache
1717RUN mkdir -p /nuget-packages /nuget-http-cache
@@ -21,11 +21,8 @@ RUN dotnet restore "Core/Cosmos.DataTransfer.Core/Cosmos.DataTransfer.Core.cspro
2121RUN dotnet build "Core/Cosmos.DataTransfer.Core/Cosmos.DataTransfer.Core.csproj" -c Release -o /app/build/Core --no-restore
2222RUN dotnet publish "Core/Cosmos.DataTransfer.Core/Cosmos.DataTransfer.Core.csproj" -c Release -o /app/publish/Core --no-restore
2323
24- # Build and publish all standard extensions
25- RUN dotnet publish "Extensions/Json/Cosmos.DataTransfer.JsonExtension/Cosmos.DataTransfer.JsonExtension.csproj" -c Release -o /app/publish/Core/Extensions || echo "Skipping Json extension"
26- RUN dotnet publish "Extensions/Cosmos/Cosmos.DataTransfer.CosmosExtension/Cosmos.DataTransfer.CosmosExtension.csproj" -c Release -o /app/publish/Core/Extensions || echo "Skipping Cosmos extension"
27- RUN dotnet publish "Extensions/Csv/Cosmos.DataTransfer.CsvExtension/Cosmos.DataTransfer.CsvExtension.csproj" -c Release -o /app/publish/Core/Extensions || echo "Skipping CSV extension"
28- RUN dotnet publish "Extensions/SqlServer/Cosmos.DataTransfer.SqlServerExtension/Cosmos.DataTransfer.SqlServerExtension.csproj" -c Release -o /app/publish/Core/Extensions || echo "Skipping SqlServer extension"
24+ # Build and publish ALL extensions
25+ RUN find Extensions -name "*.csproj" | grep -v "UnitTests" | xargs -I {} sh -c 'dotnet publish "{}" -c Release -o /app/publish/Core/Extensions || echo "Skipping $(basename $(dirname {}))"'
2926
3027# Runtime stage
3128FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
You can’t perform that action at this time.
0 commit comments