Skip to content
42 changes: 31 additions & 11 deletions eng/pipelines/pr/jobs/test-buildproj-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ parameters:
- name: buildSuffix
type: string

# Dotnet CLI verbosity level.
- name: dotnetVerbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic

# Platform Parameters ====================================================

# Display name of the platform. This will be formatted into the job's official name as well as
Expand Down Expand Up @@ -73,17 +84,26 @@ jobs:
- imageOverride -equals ${{ parameters.platformImage }}

steps:
# Install the version of the dotnet runtime we will use to execute the test target.
- template: /eng/pipelines/pr/steps/install-dotnet.yml@self
# Install dotnet and the runtime that will run the tests (if it is not netframework)
- template: /eng/pipelines/common/steps/install-dotnet.yml@self
parameters:
runtimeVersion: ${{ parameters.platformDotnet }}
${{ if not(contains(parameters.platformDotnet, 'net4')) }}:
runtimes:
- "${{ replace(parameters.platformDotnet, 'net', '') }}.x"

# Execute the test target
- template: /eng/pipelines/pr/steps/test-buildproj-step.yml
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
# Restore dotnet tools
- template: /eng/pipelines/common/steps/restore-dotnet-tools.yml@self

packageShortName: ${{ parameters.packageShortName }}
testFramework: ${{ parameters.platformDotnet }}
testProject: ${{ parameters.testProject }}
# Execute the test target
- task: DotNetCoreCLI@2
displayName: 'Test: ${{ parameters.packageShortName }}${{ parameters.testProject }}'
inputs:
command: build
projects: build.proj
Comment thread
paulmedynski marked this conversation as resolved.
verbosity: ${{ parameters.dotnetVerbosity }}
arguments: >-
-t:Test${{ parameters.packageShortName }}${{ parameters.testProject }}
-p:Configuration=${{ parameters.buildConfiguration }}
-p:BuildNumber='$(Build.BuildNumber)'
-p:BuildSuffix='${{ parameters.buildSuffix }}'
-p:TestFramework=${{ parameters.platformDotnet }}
Comment thread
paulmedynski marked this conversation as resolved.
74 changes: 56 additions & 18 deletions eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#################################################################################

parameters:
# General Parameters =====================================================

# Configuration with which to build the packages and execute the tests.
- name: buildConfiguration
type: string
Expand All @@ -16,6 +18,17 @@ parameters:
- name: buildSuffix
type: string

# Dotnet CLI verbosity level.
- name: dotnetVerbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic

# Name of the stage that generated the SA password
- name: stageNameSecrets
type: string
Expand Down Expand Up @@ -59,6 +72,11 @@ parameters:
- name: azureKeyVaultUrl
type: string

# Display name for the config being used for this execution of the manual jobs. This will be used
# for the job name, so it may only contain alphanumeric and '_' characters.
- name: configDisplayName
type: string

# Connection string using named pipes that will be set in the config.json file.
- name: connectionStringNp
type: string
Expand All @@ -71,6 +89,11 @@ parameters:
- name: fileStreamDirectory
type: string

# Whether the server that tests will be executed against is local to the job agent. If `true`
# server configuration steps will be executed prior to running the tests.
- name: isLocalServer
type: boolean

# Name of the local DB application name for localdb tests, this value will be stored in the
# config.json
- name: localDbAppName
Expand All @@ -81,9 +104,13 @@ parameters:
- name: localDbSharedInstanceName
type: string

# Manual test set to execute.
- name: testSet
type: string

jobs:
- job: "test_${{ parameters.platformDisplayName }}_sqlclient_manual"
displayName: "sqlclient_manual_${{ parameters.platformDisplayName }}"
- job: "test_${{ parameters.platformDisplayName }}_${{ parameters.configDisplayName }}_${{ parameters.testSet }}_sqlclient_manual"
displayName: "sqlclient_manual_${{ parameters.configDisplayName}}_${{ parameters.testSet }}_${{ parameters.platformDisplayName }}"

pool:
name: ${{ parameters.poolName }}
Expand All @@ -97,17 +124,23 @@ jobs:
value: $[stageDependencies.${{ parameters.stageNameSecrets }}.secrets_job.outputs['SaPassword.Value']]

steps:
# Install the version of the dotnet runtime we will use to execute the test target.
- template: /eng/pipelines/pr/steps/install-dotnet.yml@self
# Install dotnet and the runtime that will run the tests (if it is not netframework)
- template: /eng/pipelines/common/steps/install-dotnet.yml@self
parameters:
runtimeVersion: ${{ parameters.platformDotnet }}
${{ if not(contains(parameters.platformDotnet, 'net4')) }}:
runtimes:
- "${{ replace(parameters.platformDotnet, 'net', '') }}.x"

# Restore dotnet tools
- template: /eng/pipelines/common/steps/restore-dotnet-tools.yml@self

# Configure the local SQL Server instance
- template: /eng/pipelines/pr/steps/configure-sqlserver-step.yml@self
parameters:
fileStreamDirectory: ${{ parameters.fileStreamDirectory }}
operatingSystem: ${{ parameters.platformOperatingSystem }}
saPassword: $(saPassword)
- ${{ if eq(parameters.isLocalServer, true) }}:
- template: /eng/pipelines/pr/steps/configure-sqlserver-step.yml@self
parameters:
fileStreamDirectory: ${{ parameters.fileStreamDirectory }}
operatingSystem: ${{ parameters.platformOperatingSystem }}
saPassword: $(saPassword)

# Assign the generated SA password to the $Password field. This will allow $(Password) to be
# be replaced in connection strings with whatever set in the secrets stage.
Expand Down Expand Up @@ -149,12 +182,17 @@ jobs:
displayName: 'Generate manual test config'

# Execute TestSqlClientManual target from build.proj
- template: /eng/pipelines/pr/steps/test-buildproj-step.yml
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}

packageShortName: "SqlClient"
testFramework: ${{ parameters.platformDotnet }}
testProject: "Manual"
- task: DotNetCoreCLI@2
displayName: 'Test: SqlClientManual ${{ parameters.testSet }}'
inputs:
command: build
projects: build.proj
Comment thread
paulmedynski marked this conversation as resolved.
verbosity: ${{ parameters.dotnetVerbosity }}
arguments: >-
-t:TestSqlClientManual
-p:Configuration=${{ parameters.buildConfiguration }}
-p:BuildNumber='$(Build.BuildNumber)'
-p:BuildSuffix='${{ parameters.buildSuffix }}'
-p:TestFramework=${{ parameters.platformDotnet }}
-p:TestSet=${{ parameters.testSet }}

16 changes: 16 additions & 0 deletions eng/pipelines/pr/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@

name: $(DayOfYear)$(Rev:rr)

parameters:
# General Parameters =====================================================

# Dotnet CLI verbosity level.
- name: dotnetVerbosity
displayName: dotnet CLI Verbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic

variables:
- template: /eng/pipelines/common/variables/common-variables.yml@self
- template: /eng/pipelines/pr/variables/pr-variables.yml@self
Expand All @@ -28,6 +43,7 @@ stages:
parameters:
buildConfiguration: Debug
buildSuffix: pr
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
poolName: $(PoolNameDefault)
stageNamePack: ${{ variables.stageNamePack }}
stageNameSecrets: ${{ variables.stageNameSecrets }}
Expand Down
7 changes: 5 additions & 2 deletions eng/pipelines/pr/stages/pack-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ stages:
vmImage: 'ubuntu-latest'

steps:
# Install dotnet SDK and restore tools
- template: /eng/pipelines/pr/steps/install-dotnet.yml@self
# Install dotnet
- template: /eng/pipelines/common/steps/install-dotnet.yml@self

# Restore dotnet tools
- template: /eng/pipelines/common/steps/restore-dotnet-tools.yml@self

# ################################################################
# Build/Pack Microsoft.Data.SqlClient
Expand Down
97 changes: 74 additions & 23 deletions eng/pipelines/pr/stages/test-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# confidence and expedience of validation.

parameters:
# General Parameters =====================================================

# Configuration with which to build the packages and execute the tests.
- name: buildConfiguration
type: string
Expand All @@ -20,6 +22,21 @@ parameters:
- name: buildSuffix
type: string

# Dotnet CLI verbosity level.
- name: dotnetVerbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic

# Name of the pool to use for jobs that require customized VM images.
- name: poolName
type: string

# Name of the build/pack stage that this stage will depend on.
- name: stageNamePack
type: string
Expand All @@ -28,10 +45,6 @@ parameters:
- name: stageNameSecrets
type: string

# Name of the pool to use for jobs that require customized VM images.
- name: poolName
type: string

# Manual Test Configuration Parameters ==================================

# Azure Key Vault tenant ID that will be set in the config.json file for sqlclient manual tests.
Expand Down Expand Up @@ -106,6 +119,7 @@ stages:
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
Expand All @@ -119,6 +133,7 @@ stages:
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
Expand All @@ -132,6 +147,7 @@ stages:
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
Expand All @@ -146,6 +162,7 @@ stages:
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
stageNameSecrets: ${{ parameters.stageNameSecrets }}

platformDisplayName: ${{ platform.displayName }}
Expand All @@ -156,37 +173,71 @@ stages:

azureKeyVaultTenantId: ${{ parameters.manualTestAzureKeyVaultTenantId }}
azureKeyVaultUrl: ${{ parameters.manualTestAzureKeyVaultUrl }}
configDisplayName: "localhost"
connectionStringNp: ${{ parameters.manualTestConnectionStringNpLocalhost }}
connectionStringTcp: ${{ parameters.manualTestConnectionStringTcpLocalhost }}
fileStreamDirectory: ${{ parameters.manualTestFileStreamDirectory }}
isLocalServer: true
localDbAppName: ${{ parameters.manualTestLocalDbAppName }}
localDbSharedInstanceName: ${{ parameters.manualTestLocalDbSharedInstanceName }}
testSet: "123"

# TestSqlClientManual - Azure
- template: /eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml@self
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
stageNameSecrets: ${{ parameters.stageNameSecrets }}

platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
platformOperatingSystem: ${{ platform.operatingSystem }}
poolName: ${{ parameters.poolName }}

azureKeyVaultTenantId: ${{ parameters.manualTestAzureKeyVaultTenantId }}
azureKeyVaultUrl: ${{ parameters.manualTestAzureKeyVaultUrl }}
configDisplayName: "azure"
connectionStringNp: ${{ parameters.manualTestConnectionStringNpAzure }}
connectionStringTcp: ${{ parameters.manualTestConnectionStringTcpAzure }}
fileStreamDirectory: ${{ parameters.manualTestFileStreamDirectory }}
isLocalServer: false
localDbAppName: ${{ parameters.manualTestLocalDbAppName }}
localDbSharedInstanceName: ${{ parameters.manualTestLocalDbSharedInstanceName }}
testSet: "123"

# TestSqlClientManual - Localhost Always Encrypted
- template: /eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml@self
parameters:
buildConfiguration: "Release" # AE tests are not stable enough to run in DEBUG mode (as of 5/29/26)
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
stageNameSecrets: ${{ parameters.stageNameSecrets }}

platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
platformOperatingSystem: ${{ platform.operatingSystem }}
poolName: ${{ parameters.poolName }}

# @TODO:
# # TestSqlClientManual - Azure
# - template: /eng/pipelines/pr/jobs/test-sqlclientmanual-job.yml@self
# parameters:
# buildConfiguration: ${{ parameters.buildConfiguration }}
# buildSuffix: ${{ parameters.buildSuffix }}
# platformDisplayName: ${{ platform.displayName }}
# platformDotnet: ${{ platform.dotnet }}
# platformImage: ${{ platform.image }}
# poolName: ${{ parameters.poolName }}
#
# azureKeyVaultTenantId: ${{ parameters.manualTestAzureKeyVaultTenantId }}
# azureKeyVaultUrl: ${{ parameters.manualTestAzureKeyVaultUrl }}
# connectionStringNp: ${{ parameters.manualTestConnectionStringNpAzure }}
# connectionStringTcp: ${{ parameters.manualTestConnectionStringTcpAzure }}
# fileStreamDirectory: ${{ parameters.manualTestFileStreamDirectory }}
# localDbAppName: ${{ parameters.manualTestLocalDbAppName }}
# localDbSharedInstanceName: ${{ parameters.manualTestLocalDbSharedInstanceName }}
# saPassword: $(manualTestSaPassword)
azureKeyVaultTenantId: ${{ parameters.manualTestAzureKeyVaultTenantId }}
azureKeyVaultUrl: ${{ parameters.manualTestAzureKeyVaultUrl }}
configDisplayName: "localhost_ae"
connectionStringNp: ${{ parameters.manualTestConnectionStringNpLocalhost }}
connectionStringTcp: ${{ parameters.manualTestConnectionStringTcpLocalhost }}
fileStreamDirectory: ${{ parameters.manualTestFileStreamDirectory }}
isLocalServer: true
localDbAppName: ${{ parameters.manualTestLocalDbAppName }}
localDbSharedInstanceName: ${{ parameters.manualTestLocalDbSharedInstanceName }}
testSet: "AE"

# TestSqlClientUnit
- template: /eng/pipelines/pr/jobs/test-buildproj-job.yml@self
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
buildSuffix: ${{ parameters.buildSuffix }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
platformDisplayName: ${{ platform.displayName }}
platformDotnet: ${{ platform.dotnet }}
platformImage: ${{ platform.image }}
Expand Down
Loading
Loading