Skip to content

Commit

Permalink
[release/8.0] Fix stress-http pipeline (#109140)
Browse files Browse the repository at this point in the history
* Fix stress-http pipeline

* declare missing env vars for Windows Build
  • Loading branch information
rzikm authored Oct 29, 2024
1 parent a5c5cc1 commit b9853dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion eng/pipelines/libraries/stress/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extends:
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-ubuntu-2204-open
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open

steps:
- checkout: self
Expand Down Expand Up @@ -128,6 +128,10 @@ extends:
displayName: Build CLR and Libraries
- powershell: |
$env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/"
$env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/"
New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory
New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Param(
$REPO_ROOT_DIR = $(git -C "$PSScriptRoot" rev-parse --show-toplevel)
$COMPOSE_FILE = "$PSScriptRoot/docker-compose.yml"

# This is a workaround for an issue with 1es-windows-2022-open, which should be eventually removed.
# See comments in <repo>/eng/pipelines/libraries/stress/http.yml for more info.
$dockerComposeCmd = $env:DOCKER_COMPOSE_CMD
if (!(Test-Path $dockerComposeCmd)) {
$dockerComposeCmd = "docker-compose"
}

# Build runtime libraries and place in a docker image

if ($buildCurrentLibraries)
Expand Down Expand Up @@ -60,7 +67,7 @@ if ($useWindowsContainers)
$originalErrorPreference = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
try {
docker-compose --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
& $dockerComposeCmd --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
if ($LASTEXITCODE -ne 0) {
throw "docker-compose exited with error code $LASTEXITCODE"
}
Expand Down Expand Up @@ -89,5 +96,5 @@ if (!$buildOnly)

$env:HTTPSTRESS_CLIENT_ARGS = $clientStressArgs
$env:HTTPSTRESS_SERVER_ARGS = $serverStressArgs
docker-compose --file "$COMPOSE_FILE" up --abort-on-container-exit
& $dockerComposeCmd --file "$COMPOSE_FILE" up --abort-on-container-exit
}

0 comments on commit b9853dd

Please sign in to comment.