Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup dockerfiles
  • Loading branch information
antonfirsov committed Nov 16, 2021
commit cd243e613e375fa3e5215683e839a77a6cca3f51
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
FROM $SDK_BASE_IMAGE

RUN echo "DOTNET_SDK_VERSION="$DOTNET_SDK_VERSION
RUN echo "DOTNET_VERSION="$DOTNET_VERSION

WORKDIR /app
COPY . .

Expand All @@ -21,12 +18,11 @@ RUN rm -rf $PACKAGES_DIR*

ARG VERSION=7.0
ARG CONFIGURATION=Release
ARG ARCH=x64

RUN dotnet build -c $CONFIGURATION \
-p:TargetingPacksTargetsLocation=/live-runtime-artifacts/targetingpacks.targets \
-p:MicrosoftNetCoreAppRefPackDir=/live-runtime-artifacts/microsoft.netcore.app.ref/ \
-p:MicrosoftNetCoreAppRuntimePackDir=/live-runtime-artifacts/microsoft.netcore.app.runtime.linux-$ARCH/$CONFIGURATION/
-p:MicrosoftNetCoreAppRuntimePackDir=/live-runtime-artifacts/microsoft.netcore.app.runtime.linux-x64/$CONFIGURATION/

# Enable dump collection
ENV COMPlus_DbgEnableMiniDump=1
Expand All @@ -37,6 +33,6 @@ EXPOSE 5001

ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
ENV ARCH=$ARCH
ENV HTTPSTRESS_ARGS=''
CMD /live-runtime-artifacts/testhost/net$VERSION-Linux-$CONFIGURATION-$ARCH/dotnet exec ./bin/$CONFIGURATION/net$VERSION/HttpStress.dll $HTTPSTRESS_ARGS
CMD /live-runtime-artifacts/testhost/net$VERSION-Linux-$CONFIGURATION-x64/dotnet exec \
./bin/$CONFIGURATION/net$VERSION/HttpStress.dll $HTTPSTRESS_ARGS
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public static async Task<int> Main(string[] args)
return (int)await Run(config);
}

private static void ForceLoadingDependencies()
{

}

private static bool TryParseCli(string[] args, [NotNullWhen(true)] out Configuration? config)
{
var cmd = new RootCommand();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@ FROM $SDK_BASE_IMAGE
# Use powershell as the default shell
SHELL ["pwsh", "-Command"]

RUN echo "DOTNET_SDK_VERSION="$env:DOTNET_SDK_VERSION
RUN echo "DOTNET_VERSION="$env:DOTNET_VERSION

WORKDIR /app
COPY . .

# ARG CONFIGURATION=Release
# RUN dotnet build -c $env:CONFIGURATION
ARG VERSION=7.0
ENV VERSION=$VERSION
ARG CONFIGURATION=Release
ENV CONFIGURATION=$CONFIGURATION

RUN dotnet build -c $env:CONFIGURATION `
-p:TargetingPacksTargetsLocation=C:/live-runtime-artifacts/targetingpacks.targets `
Expand All @@ -30,11 +23,9 @@ ENV COMPlus_DbgMiniDumpName="C:/share/coredump.%p"

EXPOSE 5001

# ENV CONFIGURATION=$CONFIGURATION
# ENV HTTPSTRESS_ARGS=""
# CMD dotnet run --no-build -c $env:CONFIGURATION -- $env:HTTPSTRESS_ARGS.Split()

ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
ENV HTTPSTRESS_ARGS=""
CMD & C:/live-runtime-artifacts/testhost/net$env:VERSION-windows-$env:CONFIGURATION-x64/dotnet.exe exec ./bin/$env:CONFIGURATION/net$env:VERSION/HttpStress.dll $env:HTTPSTRESS_ARGS.Split()

CMD & C:/live-runtime-artifacts/testhost/net$env:VERSION-windows-$env:CONFIGURATION-x64/dotnet.exe exec `
./bin/$env:CONFIGURATION/net$env:VERSION/HttpStress.dll $env:HTTPSTRESS_ARGS.Split()
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
FROM $SDK_BASE_IMAGE

RUN echo "DOTNET_SDK_VERSION="$DOTNET_SDK_VERSION
RUN echo "DOTNET_VERSION="$DOTNET_VERSION

WORKDIR /app
COPY . .
WORKDIR /app/System.Net.Security/tests/StressTests/SslStress

ARG VERSION=7.0
ARG CONFIGURATION=Release
ARG ARCH=x64

RUN dotnet build -c $CONFIGURATION \
-p:TargetingPacksTargetsLocation=/live-runtime-artifacts/targetingpacks.targets \
-p:MicrosoftNetCoreAppRefPackDir=/live-runtime-artifacts/microsoft.netcore.app.ref/ \
-p:MicrosoftNetCoreAppRuntimePackDir=/live-runtime-artifacts/microsoft.netcore.app.runtime.linux-$ARCH/$CONFIGURATION/
-p:MicrosoftNetCoreAppRuntimePackDir=/live-runtime-artifacts/microsoft.netcore.app.runtime.linux-x64/$CONFIGURATION/

EXPOSE 5001

ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
ENV ARCH=$ARCH
ENV SSLSTRESS_ARGS=''

CMD /live-runtime-artifacts/testhost/net$VERSION-Linux-$CONFIGURATION-$ARCH/dotnet exec ./bin/$CONFIGURATION/net$VERSION/SslStress.dll $SSLSTRESS_ARGS
CMD /live-runtime-artifacts/testhost/net$VERSION-Linux-$CONFIGURATION-x64/dotnet exec \
./bin/$CONFIGURATION/net$VERSION/SslStress.dll $SSLSTRESS_ARGS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Param(
[string][Alias('c')]$configuration = "Release", # Build configuration for libraries and stress suite
[switch][Alias('w')]$useWindowsContainers, # Use windows containers, if available
[switch][Alias('b')]$buildCurrentLibraries, # Drives the stress test using libraries built from current source
[switch][Alias('pa')]$privateAspNetCore, # Drive the stress test using a private Asp.Net Core package, requires -b to be set
[switch][Alias('o')]$buildOnly, # Build, but do not run the stress app
[string][Alias('t')]$sdkImageName, # Name of the sdk image name, if built from source.
[string]$clientStressArgs = "",
Expand All @@ -30,20 +29,11 @@ if ($buildCurrentLibraries)
{
$LIBRARIES_BUILD_ARGS += " -w"
}
if($privateAspNetCore)
{
$LIBRARIES_BUILD_ARGS += " -p"
}

Invoke-Expression "& $REPO_ROOT_DIR/eng/docker/build-docker-sdk.ps1 $LIBRARIES_BUILD_ARGS"

if (!$?) { exit 1 }
}
elseif ($privateAspNetCore) {
write-output "Using a private Asp.Net Core package (-pa) requires using privately built libraries. Please, enable it with -b switch."
write-output "USAGE: . $($MyInvocation.InvocationName) -b -pa <args>"
exit 1
}

# Dockerize the stress app using docker-compose

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ FROM $SDK_BASE_IMAGE
# Use powershell as the default shell
SHELL ["pwsh", "-Command"]

RUN echo "DOTNET_SDK_VERSION="$env:DOTNET_SDK_VERSION
RUN echo "DOTNET_VERSION="$env:DOTNET_VERSION

WORKDIR /app
COPY . .
WORKDIR /app/System.Net.Security/tests/StressTests/SslStress

ARG VERSION=7.0
ARG CONFIGURATION=Release
RUN dotnet build -c $env:CONFIGURATION

RUN dotnet build -c $env:CONFIGURATION `
-p:TargetingPacksTargetsLocation=C:/live-runtime-artifacts/targetingpacks.targets `
-p:MicrosoftNetCoreAppRefPackDir=C:/live-runtime-artifacts/microsoft.netcore.app.ref/ `
-p:MicrosoftNetCoreAppRuntimePackDir=C:/live-runtime-artifacts/microsoft.netcore.app.runtime.win-x64/$env:CONFIGURATION/

EXPOSE 5001

ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
ENV SSLSTRESS_ARGS=""
CMD dotnet run --no-build -c $env:CONFIGURATION -- $env:SSLSTRESS_ARGS.Split()

CMD & C:/live-runtime-artifacts/testhost/net$env:VERSION-windows-$env:CONFIGURATION-x64/dotnet.exe exec `
./bin/$env:CONFIGURATION/net$env:VERSION/SslStress.dll $env:SSLSTRESS_ARGS.Split()