-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Networking stress tests moved out of Hosted pool #35011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
6bded78
3659662
1f87033
94d95e1
3c8576d
c518a46
9c98c11
831afd8
a02d3f9
5f7db6a
65bcc70
cb89412
67f29cd
a8d4abf
5a564a4
272b7ee
d22257a
02b1ca3
d42bec4
0d4b0fd
dd37363
8078a27
a39e3ef
bf9065f
e90b565
a130d74
19a9429
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env bash | ||
| # Builds libraries and produces a dotnet sdk docker image | ||
| # that contains the current bits in its shared framework folder. | ||
|
|
||
| # Stop script if unbound variable found (use ${var:-} if intentional) | ||
| set -u | ||
|
|
||
| # Stop script if command returns non-zero exit code. | ||
| # Prevents hidden errors caused by missing error code propagation. | ||
| set -e | ||
|
|
||
| source="${BASH_SOURCE[0]}" | ||
|
|
||
| # resolve $source until the file is no longer a symlink | ||
| while [[ -h "$source" ]]; do | ||
| scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
| source="$(readlink "$source")" | ||
| # if $source was a relative symlink, we need to resolve it relative to the path where the | ||
| # symlink file was located | ||
| [[ $source != /* ]] && source="$scriptroot/$source" | ||
| done | ||
| scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
|
||
| imagename="dotnet-sdk-libs-current" | ||
| configuration="Release" | ||
| privateaspnetcore=0 | ||
|
|
||
| while [[ $# > 0 ]]; do | ||
| opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" | ||
| case "$opt" in | ||
| -imagename|-t) | ||
| imagename=$2 | ||
| shift 2 | ||
| ;; | ||
| -configuration|-c) | ||
| configuration=$2 | ||
| shift 2 | ||
| ;; | ||
| -privateaspnetcore|-pa) | ||
| privateaspnetcore=1 | ||
| shift 1 | ||
| ;; | ||
| *) | ||
| shift 1 | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| repo_root=$(git rev-parse --show-toplevel) | ||
| docker_file="$scriptroot/libraries-sdk.linux.Dockerfile" | ||
|
|
||
| if [[ $privateaspnetcore -eq 1 ]]; then | ||
| docker_file="$scriptroot/libraries-sdk-aspnetcore.linux.Dockerfile" | ||
| fi | ||
|
|
||
| docker build --tag $imagename \ | ||
| --build-arg CONFIGURATION=$configuration \ | ||
| --file $docker_file \ | ||
| $repo_root | ||
|
|
||
| exit $? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Builds and copies library artifacts into target dotnet sdk image | ||
| # Builds and copies clr and library artifacts into target dotnet sdk image | ||
| ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-f39df28-20191023143754 | ||
| ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/core/sdk:3.0.100-buster | ||
|
|
||
|
|
@@ -8,7 +8,7 @@ WORKDIR /repo | |
| COPY . . | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On line 3: the current tag for the target sdk image is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I probably agree that we need to update the base image version, but I think it should be done separately since this PR only deals with agent pool. |
||
|
|
||
| ARG CONFIGURATION=Release | ||
| RUN ./build.sh -ci -subset clr+libs -runtimeconfiguration release -c $CONFIGURATION | ||
| RUN ./build.sh clr.runtime+clr.corelib+libs -ci -rc release -c $CONFIGURATION | ||
|
|
||
| FROM $SDK_BASE_IMAGE as target | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,19 +27,20 @@ jobs: | |
| displayName: Docker Linux | ||
| timeoutInMinutes: 120 | ||
| pool: | ||
| name: Hosted Ubuntu 1604 | ||
| name: NetCorePublic-Pool | ||
| queue: BuildPool.Ubuntu.1604.Amd64.Open | ||
|
|
||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| fetchDepth: 5 | ||
|
|
||
| - bash: | | ||
| $(dockerfilesFolder)/build-docker-sdk.ps1 -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| $(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| displayName: Build CLR and Libraries | ||
|
|
||
| - bash: | | ||
| $(httpStressProject)/run-docker-compose.ps1 -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| $(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| displayName: Build HttpStress | ||
|
|
||
| - bash: | | ||
|
|
@@ -51,23 +52,24 @@ jobs: | |
| displayName: Docker NanoServer | ||
| timeoutInMinutes: 120 | ||
| pool: | ||
| vmImage: 'windows-latest' | ||
| name: NetCorePublic-Pool | ||
| queue: BuildPool.Windows.10.Amd64.VS2019.Open | ||
|
||
|
|
||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| fetchDepth: 5 | ||
| lfs: false | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| $(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| displayName: Build CLR and Libraries | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| $(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| displayName: Build HttpStress | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| cd '$(httpStressProject)' | ||
| docker-compose up --abort-on-container-exit --no-color | ||
| displayName: Run HttpStress | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,19 +28,20 @@ jobs: | |
| displayName: Docker Linux | ||
| timeoutInMinutes: 120 | ||
| pool: | ||
| name: Hosted Ubuntu 1604 | ||
| name: NetCorePublic-Pool | ||
| queue: BuildPool.Ubuntu.1604.Amd64.Open | ||
|
|
||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| fetchDepth: 5 | ||
|
|
||
| - bash: | | ||
| $(dockerfilesFolder)/build-docker-sdk.ps1 -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| $(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| displayName: Build CLR and Libraries | ||
|
|
||
| - bash: | | ||
| $(sslStressProject)/run-docker-compose.ps1 -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| $(sslStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| displayName: Build SslStress | ||
|
|
||
| - bash: | | ||
|
|
@@ -52,23 +53,24 @@ jobs: | |
| displayName: Docker NanoServer | ||
| timeoutInMinutes: 120 | ||
| pool: | ||
| vmImage: 'windows-latest' | ||
| name: NetCorePublic-Pool | ||
| queue: BuildPool.Windows.10.Amd64.VS2019.Open | ||
|
||
|
|
||
| steps: | ||
| - checkout: self | ||
| clean: true | ||
| fetchDepth: 5 | ||
| lfs: false | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| $(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
| displayName: Build CLR and Libraries | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| $(sslStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
| displayName: Build SslStress | ||
|
|
||
| - pwsh: | | ||
| - powershell: | | ||
| cd '$(sslStressProject)' | ||
| docker-compose up --abort-on-container-exit --no-color | ||
| displayName: Run SslStress | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| #!/usr/bin/env bash | ||
| # Runs the stress test using docker-compose | ||
|
|
||
| # Stop script if unbound variable found (use ${var:-} if intentional) | ||
| set -u | ||
|
|
||
| # Stop script if command returns non-zero exit code. | ||
| # Prevents hidden errors caused by missing error code propagation. | ||
| set -e | ||
|
|
||
| source="${BASH_SOURCE[0]}" | ||
|
|
||
| # resolve $source until the file is no longer a symlink | ||
| while [[ -h "$source" ]]; do | ||
| scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
| source="$(readlink "$source")" | ||
| # if $source was a relative symlink, we need to resolve it relative to the path where the | ||
| # symlink file was located | ||
| [[ $source != /* ]] && source="$scriptroot/$source" | ||
| done | ||
| scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
|
||
| imagename="dotnet-sdk-libs-current" | ||
| configuration="Release" | ||
| privateaspnetcore=0 | ||
| buildcurrentlibraries=0 | ||
| buildonly=0 | ||
| clientstressargs="" | ||
| serverstressargs="" | ||
|
|
||
| while [[ $# > 0 ]]; do | ||
| opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" | ||
| case "$opt" in | ||
| -sdkimagename|-t) | ||
| imagename=$2 | ||
| shift 2 | ||
| ;; | ||
| -configuration|-c) | ||
| configuration=$2 | ||
| shift 2 | ||
| ;; | ||
| -privateaspnetcore|-pa) | ||
| privateaspnetcore=1 | ||
| shift 1 | ||
| ;; | ||
| -buildcurrentlibraries|-b) | ||
| buildcurrentlibraries=1 | ||
| shift 1 | ||
| ;; | ||
| -buildonly|-o) | ||
| buildonly=1 | ||
| shift 1 | ||
| ;; | ||
| -clientstressargs) | ||
| clientstressargs=$2 | ||
| shift 2 | ||
| ;; | ||
| -serverstressargs) | ||
| serverstressargs=$2 | ||
| shift 2 | ||
| ;; | ||
| *) | ||
| shift 1 | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| repo_root=$(git rev-parse --show-toplevel) | ||
|
|
||
| if [[ buildcurrentlibraries -eq 1 ]]; then | ||
| libraries_args=" -t $imagename -c $configuration" | ||
| if [[ $privateaspnetcore -eq 1 ]]; then | ||
| libraries_args="$libraries_args -pa" | ||
| fi | ||
|
|
||
| if ! $repo_root/eng/docker/build-docker-sdk.sh $libraries_args; then | ||
| exit 1 | ||
| fi | ||
|
|
||
| elif [[ $privateaspnetcore -eq 1 ]]; then | ||
| echo "Using a private Asp.Net Core package (-pa) requires using privately built libraries. Please, enable it with -b switch." | ||
| exit 1 | ||
| fi | ||
|
|
||
| build_args="" | ||
| if [[ "$imagename" != "" ]]; then | ||
| build_args=" --build-arg SDK_BASE_IMAGE=$imagename" | ||
| fi | ||
|
|
||
| compose_file="$scriptroot/docker-compose.yml" | ||
|
|
||
| if ! docker-compose --file "$compose_file" build $build_args; then | ||
| exit $? | ||
| fi | ||
|
|
||
| if [[ $buildonly -eq 0 ]]; then | ||
| export HTTPSTRESS_CLIENT_ARGS=$clientstressargs | ||
| export HTTPSTRESS_SERVER_ARGS=$serverstressargs | ||
| docker-compose --file "$compose_file" up --abort-on-container-exit | ||
| exit $? | ||
| fi |
Uh oh!
There was an error while loading. Please reload this page.