Skip to content

Commit

Permalink
Introduce NuGet token for build step
Browse files Browse the repository at this point in the history
Unlike other projects of this ilk, omitting the NuGet password secret from this Dockerfile
causes the build to fail with Value cannot be null or empty string. (Parameter 'password')
  • Loading branch information
spikeheap committed Oct 8, 2024
1 parent ad75d68 commit 74a1d16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Hackney.Shared.CautionaryAlerts.Tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ RUN --mount=type=secret,id=LBHPACKAGESTOKEN \
# Copy everything else and build
COPY . .

RUN dotnet build -c debug -o out Hackney.Shared.CautionaryAlerts.Tests/Hackney.Shared.CautionaryAlerts.Tests.csproj
RUN --mount=type=secret,id=LBHPACKAGESTOKEN \
export LBHPACKAGESTOKEN=$(cat /run/secrets/LBHPACKAGESTOKEN) && \
dotnet build -c debug -o out Hackney.Shared.CautionaryAlerts.Tests/Hackney.Shared.CautionaryAlerts.Tests.csproj

CMD dotnet test

0 comments on commit 74a1d16

Please sign in to comment.