diff --git a/eng/pipelines/dotnet-sqlclient-ci-core.yml b/eng/pipelines/dotnet-sqlclient-ci-core.yml index f94432880f..8bb6228e71 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-core.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-core.yml @@ -85,11 +85,6 @@ parameters: type: string default: $(ci_var_defaultPoolName) -- name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The timeout, in minutes, for each test job. - name: testJobTimeout type: number @@ -121,16 +116,6 @@ stages: SNIVersion: ${{parameters.SNIVersion}} SNIValidationFeed: ${{parameters.SNIValidationFeed}} - - ${{ if eq(parameters.enableStressTests, true) }}: - - template: stages/stress-tests-ci-stage.yml@self - parameters: - buildConfiguration: ${{ parameters.buildConfiguration }} - dependsOn: [build_nugets] - pipelineArtifactName: $(artifactName) - mdsPackageVersion: $(NugetPackageVersion) - ${{ if eq(parameters.debug, 'true') }}: - verbosity: 'detailed' - - template: common/templates/stages/ci-run-tests-stage.yml@self parameters: debug: ${{ parameters.debug }} diff --git a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml index 6c2f4ea169..7afcf6ad8e 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-package-reference-pipeline.yml @@ -119,11 +119,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -176,7 +171,6 @@ extends: buildType: Package codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml index d83e65dcb0..5f94a0399c 100644 --- a/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml +++ b/eng/pipelines/dotnet-sqlclient-ci-project-reference-pipeline.yml @@ -119,11 +119,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -176,7 +171,6 @@ extends: buildType: Project codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/jobs/stress-tests-ci-job.yml b/eng/pipelines/jobs/stress-tests-ci-job.yml index 2e01470fe5..7a2d417110 100644 --- a/eng/pipelines/jobs/stress-tests-ci-job.yml +++ b/eng/pipelines/jobs/stress-tests-ci-job.yml @@ -18,7 +18,6 @@ parameters: # The suffix to append to the job name. - name: jobNameSuffix type: string - default: '' # The prefix to prepend to the job's display name: # @@ -26,52 +25,68 @@ parameters: # - name: displayNamePrefix type: string - default: '' # The name of the Azure Pipelines pool to use. - name: poolName type: string - default: '' # The pool VM image to use. - name: vmImage type: string - default: '' - # The pipeline step to run to configure SQL Server. + # The filename (absolute path) of a template step to run to configure SQL + # Server. # # This step is expected to require no parameters. It must configure a SQL # Server instance listening on localhost for SQL auth via the 'sa' user with # the pipeline variable $(Password) as the password. - name: sqlSetupStep type: string - default: '' + + # The alias of the pipeline whose artifacts we should download. This is the + # name given to a pipeline resource in the resources definition section of the + # top-level pipeline, for example: + # + # resources: + # pipelines: + # - pipeline: + # + # See: + # + # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines-pipeline?view=azure-pipelines#the-pipeline-resource-metadata-as-predefined-variables + # + - name: pipelineAlias + type: string # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName type: string + + # The MDS package version to stress test. This version must be available in + # one of the configured NuGet sources. + # + # If empty, the MDS version will be parsed from the NuGet package filename + # downloaded from the pipeline artifact. + - name: mdsPackageVersion + type: string default: '' # The solution file to restore/build. - name: solution type: string - default: '' # The test project to run. - name: testProject type: string - default: '' # dotnet CLI arguments for the restore step. - name: restoreArguments type: string - default: '' # dotnet CLI arguments for the build and run steps. - name: buildArguments type: string - default: '' # The list of .NET runtimes to test against. - name: netTestRuntimes @@ -89,126 +104,181 @@ parameters: # parameter, with user 'sa' and password of $(Password). - name: configContent type: string - default: '' jobs: -- job: run_stress_tests_job_${{ parameters.jobNameSuffix }} - displayName: '[${{ parameters.displayNamePrefix }}] Run Stress Tests' - pool: - name: ${{ parameters.poolName }} - ${{ if eq(parameters.poolName, 'Azure Pipelines') }}: - vmImage: ${{ parameters.vmImage }} - ${{ else }}: - demands: - - imageOverride -equals ${{ parameters.vmImage }} - - variables: - # Stress test command-line arguments. - - name: testArguments - value: -a SqlClient.Stress.Tests -console - - # Explicitly unset the $PLATFORM environment variable that is set by the - # 'ADO Build properties' Library in the ADO SqlClientDrivers public project. - # This is defined with a non-standard Platform of 'AnyCPU', and will fail - # the builds if left defined. The stress tests solution does not require - # any specific Platform, and so its solution file doesn't support any - # non-standard platforms. - # - # Note that Azure Pipelines will inject this variable as PLATFORM into the - # environment of all tasks in this job. - # - # See: - # https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch - # - - name: Platform - value: '' - - # Do the same for $CONFIGURATION since we explicitly set it using our - # 'buildConfiguration' parameter, and we don't want the environment to - # override us. - - name: Configuration - value: '' - - steps: - - # Install the .NET 9.0 SDK. - - task: UseDotNet@2 - displayName: Install .NET 9.0 SDK - inputs: - packageType: sdk - version: 9.x - - # Install the .NET 8.0 runtime. - - task: UseDotNet@2 - displayName: Install .NET 8.0 Runtime - inputs: - packageType: runtime - version: 8.x - - # Download the pipeline artifact that contains the MDS package to test. - - task: DownloadPipelineArtifact@2 - displayName: Download Pipeline Artifact - inputs: - artifactName: ${{ parameters.pipelineArtifactName }} - # The stress tests solution has a NuGet.config file that configures - # sources to look in this packages/ directory. - targetPath: $(Build.SourcesDirectory)/packages - - # Setup the local SQL Server. - - template: ${{ parameters.sqlSetupStep }}@self - - # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support - # all of our argument combinations for the different build steps. - - # Restore the solution. - - task: DotNetCoreCLI@2 - displayName: Restore Solution - inputs: - command: custom - custom: restore - projects: ${{ parameters.solution }} - arguments: ${{ parameters.restoreArguments }} - - # Build the solution. - - task: DotNetCoreCLI@2 - displayName: Build Solution - inputs: - command: custom - custom: build - projects: ${{ parameters.solution }} - arguments: ${{ parameters.buildArguments }} --no-restore - - # Write the config file. - - task: PowerShell@2 - displayName: Write Config File - inputs: - pwsh: true - targetType: inline - script: | - # Capture the multi-line JSON content into a variable. - $content = @" - ${{ parameters.configContent }} - "@ - - # Write the JSON content to the config file. - $content | Out-File -FilePath "config.json" - - # Run the stress tests for each .NET runtime. - - ${{ each runtime in parameters.netTestRuntimes }}: - - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] - inputs: - command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) - - # Run the stress tests for each .NET Framework runtime. - - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: - - task: DotNetCoreCLI@2 - displayName: Test [${{runtime}}] - inputs: - command: custom - custom: run - projects: ${{ parameters.testProject }} - arguments: ${{ parameters.buildArguments }} --no-build -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + - job: run_stress_tests_job_${{ parameters.jobNameSuffix }} + displayName: '[${{ parameters.displayNamePrefix }}] Run Stress Tests' + pool: + name: ${{ parameters.poolName }} + ${{ if eq(parameters.poolName, 'Azure Pipelines') }}: + vmImage: ${{ parameters.vmImage }} + ${{ else }}: + demands: + - imageOverride -equals ${{ parameters.vmImage }} + + variables: + + # Stress test command-line arguments. + - name: testArguments + value: -a SqlClient.Stress.Tests -console + + # The MDS package version to use. + # + # We assign the parameter to a variable so we can update it later via a + # PowerShell script that parses the version from the package filename. + - name: mdsVersion + value: ${{ parameters.mdsPackageVersion }} + + # Variables for the specific pipeline run to download artifacts from. We + # must expand these values here; they don't expand properly if used + # directly in the download task step below. + - name: artifactProjectId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.projectID']] + - name: artifactPipelineId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.pipelineID']] + - name: artifactRunId + value: $[variables['resources.pipeline.${{ parameters.pipelineAlias }}.runID']] + + steps: + + # Install the .NET 10.0 SDK. + - task: UseDotNet@2 + displayName: Install .NET 10.0 SDK + inputs: + packageType: sdk + version: 10.x + + # Install the .NET 9.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 9.0 Runtime + inputs: + packageType: runtime + version: 9.x + + # Install the .NET 8.0 Runtime. + - task: UseDotNet@2 + displayName: Install .NET 8.0 Runtime + inputs: + packageType: runtime + version: 8.x + + # Download the pipeline artifact that contains the MDS package to test. + - task: DownloadPipelineArtifact@2 + displayName: Download Pipeline Artifact + inputs: + buildType: specific + artifactName: ${{ parameters.pipelineArtifactName }} + # The stress tests solution has a NuGet.config file that configures + # sources to look in this packages/ directory. + targetPath: $(Build.SourcesDirectory)/packages + # If we were triggered by an upstream pipeline run, download the + # artifacts from that specific run. + preferTriggeringPipeline: true + # Otherwise, use the pipeline alias to explicitly choose the + # artifacts. + project: $(artifactProjectId) + pipeline: $(artifactPipelineId) + runVersion: specific + runId: $(artifactRunId) + + # Determine the MDS package version if not specified. + # + # This will clobber the $(mdsVersion) variable. + # + - ${{ if eq(parameters.mdsPackageVersion, '') }}: + - task: PowerShell@2 + displayName: Determine MDS Package Version + inputs: + pwsh: true + targetType: inline + script: | + # Get the list of MDS package files in the packages directory. + $packageFiles = Get-ChildItem -Path "$(Build.SourcesDirectory)/packages" -Filter "Microsoft.Data.SqlClient.*.nupkg" + + if ($packageFiles.Count -eq 0) + { + throw "No Microsoft.Data.SqlClient NuGet package found in packages directory." + } + elseif ($packageFiles.Count -gt 1) + { + throw "Multiple Microsoft.Data.SqlClient NuGet packages found in packages directory." + } + else + { + # Extract the version from the package filename. + $packageFile = $packageFiles[0] + if ($packageFile.Name -match 'Microsoft\.Data\.SqlClient\.(?.+)\.nupkg') + { + $version = $matches['version'] + Write-Host "##vso[task.setvariable variable=mdsVersion]$version" + Write-Host "Determined MDS package version: $version" + } + else + { + throw "Failed to parse version from package filename: $($packageFile.Name)" + } + } + + # Emit the MDS version under test. + - pwsh: | + Write-Host "Testing MDS package version: $(mdsVersion)" + displayName: Emit MDS Version + + # Setup the local SQL Server. + - template: ${{ parameters.sqlSetupStep }}@self + + # We use the 'custom' command because the DotNetCoreCLI@2 task doesn't support + # all of our argument combinations for the different build steps. + + # Restore the solution. + - task: DotNetCoreCLI@2 + displayName: Restore Solution + inputs: + command: custom + custom: restore + projects: ${{ parameters.solution }} + arguments: ${{ parameters.restoreArguments }} -p:MdsPackageVersion=$(mdsVersion) + + # Build the solution. + - task: DotNetCoreCLI@2 + displayName: Build Solution + inputs: + command: custom + custom: build + projects: ${{ parameters.solution }} + arguments: ${{ parameters.buildArguments }} --no-restore -p:MdsPackageVersion=$(mdsVersion) + + # Write the config file. + - task: PowerShell@2 + displayName: Write Config File + inputs: + pwsh: true + targetType: inline + script: | + # Capture the multi-line JSON content into a variable. + $content = @" + ${{ parameters.configContent }} + "@ + + # Write the JSON content to the config file. + $content | Out-File -FilePath "config.json" + + # Run the stress tests for each .NET runtime. + - ${{ each runtime in parameters.netTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) + + # Run the stress tests for each .NET Framework runtime. + - ${{ each runtime in parameters.netFrameworkTestRuntimes }}: + - task: DotNetCoreCLI@2 + displayName: Test [${{runtime}}] + inputs: + command: custom + custom: run + projects: ${{ parameters.testProject }} + arguments: ${{ parameters.buildArguments }} --no-build -p:MdsPackageVersion=$(mdsVersion) -f ${{runtime}} -e STRESS_CONFIG_FILE=config.json -- $(testArguments) diff --git a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml index bc88cb5f38..af60795f11 100644 --- a/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-package-ref-pipeline.yml @@ -76,11 +76,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -131,7 +126,6 @@ extends: buildType: Package codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml index 2fc0cad210..cee2f07470 100644 --- a/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml +++ b/eng/pipelines/sqlclient-pr-project-ref-pipeline.yml @@ -76,11 +76,6 @@ parameters: type: boolean default: false - - name: enableStressTests - displayName: Enable Stress Tests - type: boolean - default: false - # The target frameworks to build and run tests for on Windows. # # These are _not_ the target frameworks to build the driver packages for. @@ -131,7 +126,6 @@ extends: buildType: Project codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} debug: ${{ parameters.debug }} - enableStressTests: ${{ parameters.enableStressTests }} targetFrameworks: ${{ parameters.targetFrameworks }} targetFrameworksUnix: ${{ parameters.targetFrameworksUnix }} testSets: ${{ parameters.testSets }} diff --git a/eng/pipelines/stages/stress-tests-ci-stage.yml b/eng/pipelines/stages/stress-tests-ci-stage.yml index b7cea84b82..9755cf5cd8 100644 --- a/eng/pipelines/stages/stress-tests-ci-stage.yml +++ b/eng/pipelines/stages/stress-tests-ci-stage.yml @@ -22,49 +22,52 @@ parameters: # The type of build to produce (Debug or Release) - name: buildConfiguration - displayName: Build Configuration type: string - default: Debug values: - Debug - Release - # The names of any stages this stage depends on, for example the stages - # that publish the MDS package artifacts we will test. - - name: dependsOn - displayName: Depends On Stages - type: object - default: [] + # The alias of the pipeline whose artifacts we should download. This is the + # name given to a pipeline resource in the resources definition section of the + # top-level pipeline, for example: + # + # resources: + # pipelines: + # - pipeline: + # + # See: + # + # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines-pipeline?view=azure-pipelines#the-pipeline-resource-metadata-as-predefined-variables + # + - name: pipelineAlias + type: string # The name of the pipeline artifact to download that contains the MDS package # to stress test. - name: pipelineArtifactName - displayName: Pipeline Artifact Name type: string - default: Artifacts # The MDS package version to stress test. This version must be available in # one of the configured NuGet sources. + # + # If empty, the MDS version will be parsed from the NuGet package filename + # downloaded from the pipeline artifact. - name: mdsPackageVersion - displayName: MDS Package Version type: string default: '' # The list of .NET runtimes to test against. - name: netTestRuntimes - displayName: .NET Test Runtimes type: object - default: [net8.0, net9.0] + default: [net8.0, net9.0, net10.0] # The list of .NET Framework runtimes to test against. - name: netFrameworkTestRuntimes - displayName: .NET Framework Test Runtimes type: object - default: [net462, net47, net471, net472, net48, net481] + default: [net462] # The verbosity level for the dotnet CLI commands. - name: verbosity - displayName: Dotnet CLI verbosity type: string default: normal values: @@ -77,11 +80,10 @@ parameters: stages: - stage: run_stress_tests_stage displayName: Run Stress Tests - dependsOn: ${{ parameters.dependsOn }} variables: # The directory where dotnet artifacts will be staged. Not to be - # confused with pipeline artifact. + # confused with pipeline artifacts. - name: dotnetArtifactsDir value: $(Build.StagingDirectory)/dotnetArtifacts @@ -98,7 +100,6 @@ stages: value: >- --verbosity ${{parameters.verbosity}} --artifacts-path $(dotnetArtifactsDir) - -p:MdsPackageVersion=${{parameters.mdsPackageVersion}} # dotnet CLI arguments for build/run commands. - name: buildArguments @@ -109,7 +110,7 @@ stages: # The contents of the config file to use for all tests. We will write # this to a JSON file for each test job, and then point to it via the # STRESS_CONFIG_FILE environment variable. - - name: ConfigContent + - name: configContent value: | [ { @@ -132,34 +133,38 @@ stages: # -------------------------------------------------------------------------- # Build and test on Linux. - - template: ../jobs/stress-tests-ci-job.yml@self + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: linux displayNamePrefix: Linux - poolName: $(ci_var_defaultPoolName) + poolName: ADO-CI-1ES-Pool vmImage: ADO-UB20-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) buildArguments: $(buildArguments) netTestRuntimes: ${{ parameters.netTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) # -------------------------------------------------------------------------- # Build and test on Windows - - template: ../jobs/stress-tests-ci-job.yml + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: windows displayNamePrefix: Win - poolName: $(ci_var_defaultPoolName) + poolName: ADO-CI-1ES-Pool # The Windows images include a suitable .NET Framework runtime, so we # don't have to install one explicitly. vmImage: ADO-MMS22-SQL22 sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-win-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) @@ -168,12 +173,12 @@ stages: # Note that we include the .NET Framework runtimes for test runs on # Windows. netFrameworkTestRuntimes: ${{ parameters.netFrameworkTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) # -------------------------------------------------------------------------- # Build and test on macOS. - - template: ../jobs/stress-tests-ci-job.yml + - template: /eng/pipelines/jobs/stress-tests-ci-job.yml@self parameters: jobNameSuffix: macos displayNamePrefix: macOS @@ -182,10 +187,12 @@ stages: poolName: Azure Pipelines vmImage: macos-latest sqlSetupStep: /eng/pipelines/common/templates/steps/configure-sql-server-macos-step.yml + pipelineAlias: ${{ parameters.pipelineAlias }} pipelineArtifactName: ${{ parameters.pipelineArtifactName }} + mdsPackageVersion: ${{ parameters.mdsPackageVersion }} solution: $(solution) testProject: $(testProject) restoreArguments: $(commonArguments) buildArguments: $(buildArguments) netTestRuntimes: ${{ parameters.netTestRuntimes }} - configContent: $(ConfigContent) + configContent: $(configContent) diff --git a/eng/pipelines/stress-tests-pipeline.yml b/eng/pipelines/stress-tests-pipeline.yml index e694a4cb03..1103754b9c 100644 --- a/eng/pipelines/stress-tests-pipeline.yml +++ b/eng/pipelines/stress-tests-pipeline.yml @@ -1,28 +1,27 @@ -################################################################################# -# Licensed to the .NET Foundation under one or more agreements. # -# The .NET Foundation licenses this file to you under the MIT license. # -# See the LICENSE file in the project root for more information. # -################################################################################# +################################################################################ +# Licensed to the .NET Foundation under one or more agreements. +# The .NET Foundation licenses this file to you under the MIT license. +# See the LICENSE file in the project root for more information. +################################################################################ -# This pipeline runs the stress test suite using the most recent artifacts from -# the CI-SqlClient-Package pipeline. +# This pipeline runs the stress test suite using the artifacts from the +# triggering pipeline. # # It runs after every successful run of the following pipelines: # # Public project: -# - PR-SqlClient-Package -# - CI-SqlClient-Package +# - CI-SqlClient-Package (branch main only) # -# ADO.net project: -# - MDS Main CI-Package +# ADO.Net project: +# - MDS Main CI-Package (branch internal/main only) # # This pipeline definition is mapped to the Stress-SqlClient pipelines: # # Public project: # -# TODO +# https://dev.azure.com/SqlClientDrivers/public/_build?definitionId=2212 # -# ADO.net project: +# ADO.Net project: # # TODO @@ -33,24 +32,38 @@ name: $(DayOfYear)$(Rev:rr) pr: none trigger: none -# Trigger this pipeline after successful runs of each of the following pipelines. +# Trigger this pipeline after successful runs of each of the following +# pipelines. +# +# The pipeline identifiers are displayed in the Azure DevOps UI, so it is +# helpful if they indicate the project, folder, and pipeline name, hence the +# verbose values below. +# resources: pipelines: - # The PR-SqlClient-Package pipeline in the Public project. - - pipeline: upstreamPipeline1 + + # TODO: Remove this pipeline; it exists for testing via PR runs. + - pipeline: Public-ADO-PR-SqlClient-Package project: Public source: /ADO/PR-SqlClient-Package - trigger: true + # The CI-SqlClient-Package pipeline in the Public project. - - pipeline: upstreamPipeline2 + - pipeline: Public-ADO-CI-SqlClient-Package project: Public source: /ADO/CI-SqlClient-Package - trigger: true - # The MDS Main CI-Package pipeline in the ADO.net project. - - pipeline: upstreamPipeline3 - project: ADO.net + trigger: + branches: + include: + - main + + # The MDS Main CI-Package pipeline in the ADO.Net project. + - pipeline: ADO-Net-Internal-CI-MDS-Main-CI-Package + project: ADO.Net source: /Internal CI/MDS Main CI-Package - trigger: true + trigger: + branches: + include: + - internal/main # Pipeline parameters, visible in the Azure DevOps UI. parameters: @@ -69,12 +82,22 @@ parameters: type: boolean default: false +variables: + # If we were triggered by an upstream pipeline, use the alias of that pipeline + # resource. Otherwise, assume we were triggered manually via the Azure DevOps + # UI and arbitrarily choose the Public CI-SqlClient-Package pipeline. + # + # TODO: Use CI-SqlClient-Package instead of PR-SqlClient-Package. + - name: pipelineAlias + value: $[coalesce(variables['Resources.TriggeringAlias'], 'Public-ADO-PR-SqlClient-Package')] + stages: -- stage: Placeholder - displayName: Placeholder Stage - jobs: - - job: PlaceholderJob - displayName: Placeholder Job - steps: - - script: echo "This is a placeholder stage." - displayName: Placeholder Step + - template: /eng/pipelines/stages/stress-tests-ci-stage.yml@self + parameters: + buildConfiguration: ${{ parameters.buildConfiguration }} + pipelineAlias: $(pipelineAlias) + # All of the pipelines that trigger us produce the same artifact name. + # (See dotnet-sqlclient-ci-core.yml.) + pipelineArtifactName: Artifacts + ${{ if eq(parameters.debug, 'true') }}: + verbosity: 'detailed'