diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 40552c1a0e18f8..beaa3ac99b3776 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -39,18 +39,18 @@ extends: timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + demands: ImageOverride -equals build.azurelinux.3.amd64.open steps: - bash: | cd $(enterpriseTestsSetup) - docker-compose build + docker compose build displayName: Build test machine images env: DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) - bash: | cd $(enterpriseTestsSetup) - docker-compose up -d + docker compose up -d displayName: Start test network and machines env: DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) @@ -73,7 +73,7 @@ extends: - bash: | cd $(enterpriseTestsSetup) - docker-compose down + docker compose down displayName: Stop test network and machines env: DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index 1a47c8c20fa124..f21d35b224d5ce 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -38,7 +38,7 @@ extends: DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/" pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + demands: ImageOverride -equals build.azurelinux.3.amd64.open steps: - checkout: self @@ -63,7 +63,7 @@ extends: 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 + 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')) @@ -73,8 +73,8 @@ extends: 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 + 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')) @@ -83,8 +83,8 @@ extends: 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 + 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')) @@ -138,7 +138,7 @@ extends: $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 + 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')) @@ -147,7 +147,7 @@ extends: $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 + 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')) @@ -156,7 +156,7 @@ extends: $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 + 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')) diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index b1cde49409491b..c25082a0559bb4 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -39,7 +39,7 @@ extends: DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/" pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + demands: ImageOverride -equals build.azurelinux.3.amd64.open steps: - checkout: self @@ -60,7 +60,7 @@ extends: export STRESS_CLIENT_ARGS=$SSLSTRESS_CLIENT_ARGS export STRESS_SERVER_ARGS=$SSLSTRESS_SERVER_ARGS mkdir -p $DUMPS_SHARE - docker-compose up --abort-on-container-exit --no-color + docker compose up --abort-on-container-exit --no-color displayName: Run SslStress - publish: $(Build.ArtifactStagingDirectory)/dumps @@ -96,7 +96,7 @@ extends: $env:STRESS_CLIENT_ARGS = $env:SSLSTRESS_CLIENT_ARGS $env:STRESS_SERVER_ARGS = $env:SSLSTRESS_SERVER_ARGS New-Item -Force $env:DUMPS_SHARE -ItemType Directory - docker-compose up --abort-on-container-exit --no-color + docker compose up --abort-on-container-exit --no-color displayName: Run SslStress - publish: $(Build.ArtifactStagingDirectory)/dumps diff --git a/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1 b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1 index aa98ee92c4ee90..0897e62ad36ede 100644 --- a/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1 +++ b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1 @@ -1,5 +1,5 @@ #!/usr/bin/env pwsh -# Runs the stress test using docker-compose +# Runs the stress test using docker compose [CmdletBinding(PositionalBinding = $false)] Param( @@ -50,7 +50,7 @@ if ($useWindowsContainers) { } if (!$noBuild) { - # Dockerize the stress app using docker-compose + # Dockerize the stress app using docker compose $BuildArgs = @( "--build-arg", "VERSION=$Version", "--build-arg", "CONFIGURATION=$configuration" @@ -61,10 +61,10 @@ if (!$noBuild) { $originalErrorPreference = $ErrorActionPreference $ErrorActionPreference = 'Continue' try { - write-output "docker-compose --file $COMPOSE_FILE build $buildArgs" - docker-compose --file $COMPOSE_FILE build @buildArgs 2>&1 + write-output "docker compose --file $COMPOSE_FILE build $buildArgs" + docker compose --file $COMPOSE_FILE build @buildArgs 2>&1 if ($LASTEXITCODE -ne 0) { - throw "docker-compose exited with error code $LASTEXITCODE" + throw "docker compose exited with error code $LASTEXITCODE" } } finally { @@ -86,5 +86,5 @@ if (!$buildOnly) { $env:STRESS_CLIENT_ARGS = $clientStressArgs $env:STRESS_SERVER_ARGS = $serverStressArgs - docker-compose --file "$COMPOSE_FILE" up --abort-on-container-exit + docker compose --file "$COMPOSE_FILE" up --abort-on-container-exit } diff --git a/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh index 6b50a01f5d2ffa..9db8f7f5b59d7a 100755 --- a/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh +++ b/src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Runs the stress test using docker-compose +# Runs the stress test using docker compose # Stop script if unbound variable found (use ${var:-} if intentional) set -u @@ -100,7 +100,7 @@ if [[ "$nobuild" -eq 0 ]]; then build_args="$build_args --build-arg SDK_BASE_IMAGE=$imagename" fi - if ! docker-compose --file "$compose_file" build $build_args; then + if ! docker compose --file "$compose_file" build $build_args; then exit $? fi fi @@ -113,6 +113,6 @@ if [[ "$buildonly" -eq 0 ]]; then export STRESS_CLIENT_ARGS=$clientstressargs export STRESS_SERVER_ARGS=$serverstressargs - docker-compose --file "$compose_file" up --abort-on-container-exit + docker compose --file "$compose_file" up --abort-on-container-exit exit $? fi