Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 27 additions & 0 deletions eng/pipelines/libraries/stress/http-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
trigger: none

pr:
branches:
include:
- main
- release/*.0
paths:
include:
- src/libraries/System.Net.Http/tests/StressTests/HttpStress/**
- src/libraries/Common/tests/System/Net/StressTests/**
- eng/pipelines/libraries/stress/**

variables:
- template: ../variables.yml
- name: dockerfilesFolder
value: $(Build.SourcesDirectory)/eng/docker
- name: httpStressProject
value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress
- name: sdkBaseImage
value: dotnet-sdk-libraries-current

extends:
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
parameters:
stages:
- template: /eng/pipelines/libraries/stress/http-stages.yml
141 changes: 141 additions & 0 deletions eng/pipelines/libraries/stress/http-stages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
stages:
Comment thread
ManickaP marked this conversation as resolved.
- stage: Build
jobs:
- job: linux
displayName: Docker Linux
timeoutInMinutes: 240
variables:
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals build.azurelinux.3.amd64.open

steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- bash: |
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildRuntime
displayName: Build CLR and Libraries

- bash: |
$(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
displayName: Build HttpStress

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
mkdir -p $DUMPS_SHARE
docker compose up --abort-on-container-exit --no-color
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0"
mkdir -p $DUMPS_SHARE
docker compose down
docker compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 2.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1"
mkdir -p $DUMPS_SHARE
docker compose down
docker compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 1.1
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
sudo chown -R $(id -u):$(id -g) $(Build.ArtifactStagingDirectory)/dumps
displayName: Own shared dumps and files
condition: failed()

- publish: $(Build.ArtifactStagingDirectory)/dumps
artifact: DumpsLinux
condition: failed()

- job: windows
displayName: Docker NanoServer
timeoutInMinutes: 150
variables:
DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2026.amd64.open

steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false
lfs: false

- powershell: |
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildRuntime
displayName: Build CLR and Libraries

- powershell: |
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
displayName: Build HttpStress

# Firewall is disabled for the test runs, since it can lead to unexpected TCP failures on CI machines, which are unrelated to the HTTP logic.
# See: https://github.com/dotnet/runtime/issues/50854
Comment thread
ManickaP marked this conversation as resolved.
- powershell: |
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False
name: disableFirewall
displayName: Disable Firewall

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 2.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 1.1
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- publish: $(Build.ArtifactStagingDirectory)/dumps
artifact: DumpsWindows
condition: failed()

- powershell: |
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
name: enableFirewall
displayName: Enable Firewall
155 changes: 2 additions & 153 deletions eng/pipelines/libraries/stress/http.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
trigger: none

pr:
branches:
include:
- main
- release/*.0
paths:
include:
- src/libraries/System.Net.Http/tests/StressTests/HttpStress/**
- src/libraries/Common/tests/System/Net/StressTests/**
- eng/pipelines/libraries/stress/**

schedules:
- cron: "0 13 * * *" # 1PM UTC => 5 AM PST
displayName: HttpStress nightly run
Expand All @@ -29,148 +18,8 @@ variables:
- name: sdkBaseImage
value: dotnet-sdk-libraries-current


extends:
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
parameters:
stages:
- stage: Build
jobs:
- job: linux
displayName: Docker Linux
timeoutInMinutes: 240
variables:
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals build.azurelinux.3.amd64.open

steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- bash: |
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildRuntime
displayName: Build CLR and Libraries

- bash: |
$(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
displayName: Build HttpStress

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
mkdir -p $DUMPS_SHARE
docker compose up --abort-on-container-exit --no-color
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0"
mkdir -p $DUMPS_SHARE
docker compose down
docker compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 2.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
cd '$(httpStressProject)'
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1"
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1"
mkdir -p $DUMPS_SHARE
docker compose down
docker compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 1.1
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- bash: |
sudo chown -R $(id -u):$(id -g) $(Build.ArtifactStagingDirectory)/dumps
displayName: Own shared dumps and files
condition: failed()

- publish: $(Build.ArtifactStagingDirectory)/dumps
artifact: DumpsLinux
condition: failed()

- job: windows
displayName: Docker NanoServer
timeoutInMinutes: 150
variables:
DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2026.amd64.open

steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false
lfs: false

- powershell: |
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildRuntime
displayName: Build CLR and Libraries

- powershell: |
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
displayName: Build HttpStress

# Firewall is disabled for the test runs, since it can lead to unexpected TCP failures on CI machines, which are unrelated to the HTTP logic.
# See: https://github.com/dotnet/runtime/issues/50854
- powershell: |
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False
name: disableFirewall
displayName: Disable Firewall

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 2.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- powershell: |
cd '$(httpStressProject)'
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 1.1
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))

- publish: $(Build.ArtifactStagingDirectory)/dumps
artifact: DumpsWindows
condition: failed()

- powershell: |
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
name: enableFirewall
displayName: Enable Firewall
- template: /eng/pipelines/libraries/stress/http-stages.yml
27 changes: 27 additions & 0 deletions eng/pipelines/libraries/stress/ssl-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
trigger: none

pr:
branches:
include:
- main
- release/*.0
paths:
include:
- src/libraries/System.Net.Security/tests/StressTests/SslStress/**
- src/libraries/Common/tests/System/Net/StressTests/**
- eng/pipelines/libraries/stress/**

variables:
- template: ../variables.yml
- name: dockerfilesFolder
value: $(Build.SourcesDirectory)/eng/docker
- name: sslStressProject
value: $(sourcesRoot)/System.Net.Security/tests/StressTests/SslStress
- name: sdkBaseImage
value: dotnet-sdk-libraries-current

extends:
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
parameters:
stages:
- template: /eng/pipelines/libraries/stress/ssl-stages.yml
Loading
Loading