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
1 change: 0 additions & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
</PropertyGroup>
<Message Text=">>> Running Manual test for Windows via command: $(TestCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(TestCommand)" />

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Sql22_named_instance net9_0_AnyCPU_NativeSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (win11_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (win11_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_ARM64_Sql net9_0_AnyCPU_ManagedSNI_2)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=2 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-2" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_ARM64_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 421 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_ARM64_Sql net462_AnyCPU_3)

build.proj#L421

build.proj(421,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetfxVersion=net462 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetfx --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetfx-3" " exited with code 1.
</Target>

<!-- Run all Manual tests applicable to Unix. -->
Expand Down Expand Up @@ -450,7 +450,6 @@
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "bin", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", ".nuget", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "obj", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "packages", SearchOption.AllDirectories))' />
</Target>

<!-- AKV Targets ========================================================= -->
Expand Down
9 changes: 5 additions & 4 deletions eng/pipelines/akv-official-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,16 @@ extends:
roslyn:
enabled: ${{ parameters.runSdlTasks }}
break: true
# Requires RoslynAnalyzers task to be added after build task
# Requires RoslynAnalyzers task to be added somewhere in
# the build stage.

publishLogs:
enabled: ${{ parameters.runSdlTasks }}

sbom:
enabled: ${{ parameters.runSdlTasks }}
packageName: 'Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider'
packageVersion: ${{ variables.nugetPackageVersion }}
packageVersion: ${{ variables.akvPackageVersion }}

tsa:
# OneBranch publishes all sdl results to TSA. If TSA is disabled all SDL tools will
Expand All @@ -127,11 +128,11 @@ extends:
jobs:
- template: /eng/pipelines/jobs/build-akv-official-job.yml@self
parameters:
akvAssemblyFileVersion: '${{ variables.assemblyFileVersion }}'
akvPackageVersion: '${{ variables.akvPackageVersion }}'
apiScanDllPath: '${{ variables.apiScanDllPath }}'
apiScanPdbPath: '${{ variables.apiScanPdbPath }}'
assemblyFileVersion: '${{ variables.assemblyFileVersion }}'
buildConfiguration: '${{ parameters.buildConfiguration }}'
nugetPackageVersion: '${{ variables.nugetPackageVersion }}'
mdsPackageVersion: '${{ variables.mdsPackageVersion }}'
publishSymbols: '${{ parameters.publishSymbols }}'
signingAppRegistrationClientId: '$(SigningAppRegistrationClientId)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
variables:
- template: ../../../libraries/variables.yml@self
- ${{ if parameters.isPreview }}:
- name: NugetPackageVersion
value: $(PreviewNugetPackageVersion)
- name: abstractionsPackageVersion
value: $(abstractionsPackagePreviewVersion)
- name: mdsPackageVersion
value: $(previewMdsPackageVersion)

steps:
- script: SET
Expand All @@ -37,20 +39,56 @@ jobs:
- powershell: |
Write-Host "##vso[task.setvariable variable=CDP_BUILD_TYPE_COPY;isOutput=true]$($env:CDP_BUILD_TYPE)"
name: GetBuildType

- template: ../steps/build-all-configurations-signed-dlls-step.yml@self


# Build our tooling, which is required by the analysis step below, but
# shouldn't be analyzed itself.
- task: MSBuild@1
displayName: 'Build Tooling'
inputs:
solution: '**/build.proj'
configuration: $(Configuration)
msbuildArguments: -t:BuildTools

# Perform analysis before building, since this step will clobber build output
- template: ../steps/code-analyze-step.yml@self

# Update the root NuGet.config to use the packages/ directory as a source.
# When we build MDS in Package mode, it depends on the Abstractions package,
# which we will build and package into packages/.
- template: ../steps/update-nuget-config-local-feed-step.yml
parameters:
analyzeType: all
packagePath: $(REPOROOT)/packages

# Build the Abstractions package.
- task: MSBuild@1
displayName: Build Abstractions
inputs:
solution: '**/build.proj'
configuration: $(Configuration)
msbuildArguments: -t:BuildAbstractions

# Build MDS in Package mode, producing signed DLLs.
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self
parameters:
# These variables are sourced from common-variables.yml.
abstractionsAssemblyFileVersion: $(abstractionsAssemblyFileVersion)
abstractionsPackageVersion: $(abstractionsPackageVersion)
configuration: $(Configuration)
mdsAssemblyFileVersion: $(mdsAssemblyFileVersion)
mdsPackageVersion: $(mdsPackageVersion)
referenceType: Package

- template: ../steps/esrp-code-signing-step.yml@self
parameters:
artifactType: dll

- template: ../steps/generate-nuget-package-step.yml@self
parameters:
OutputDirectory: $(artifactDirectory)
nuspecPath: $(nuspecPath)
packageVersion: $(mdsPackageVersion)
outputDirectory: $(artifactDirectory)
displayName: 'Create MDS NuGet Package'
referenceType: Package
properties: 'AbstractionsPackageVersion=$(abstractionsPackageVersion)'

- template: ../steps/esrp-code-signing-step.yml@self
Expand All @@ -65,4 +103,4 @@ jobs:
- template: ../steps/publish-symbols-step.yml@self
parameters:
publishSymbols: ${{ parameters['PublishSymbols'] }}
symbolsArtifactName: mds_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_$(NuGetPackageVersion)_$(System.TimelineId)
symbolsArtifactName: mds_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_$(mdsPackageVersion)_$(System.TimelineId)
83 changes: 67 additions & 16 deletions eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
# See the LICENSE file in the project root for more information. #
#################################################################################
parameters:

- name: 'debug'
type: boolean
default: false

- name: referenceType
type: string
values:
- Package
- Project

- name: poolName
type: string
default: $(ci_var_defaultPoolName)
Expand All @@ -12,9 +23,13 @@ parameters:
type: string
default: ADO-MMS22-SQL19

- name: artifactName
- name: abstractionsArtifactName
type: string
default: Artifacts
default: Abstractions.Artifact

- name: mdsArtifactName
type: string
default: MDS.Artifact

- name: platform
type: string
Expand All @@ -28,8 +43,15 @@ parameters:
type: stepList
default: []

- name: abstractionsPackageVersion
type: string

- name: mdsPackageVersion
type: string

jobs:
- job: build_nugets
- job: build_mds_akv_packages_job
displayName: Build MDS & AKV Packages

pool:
name: ${{parameters.poolName }}
Expand All @@ -44,36 +66,65 @@ jobs:
- ${{ if ne(parameters.prebuildSteps, '') }}:
- ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration

# If we're testing in Package mode, download the Abstractions package artifacts into packages/,
# and then setup the top-level NuGet.config to look in packages/ for local
# NuGet dependencies.
- ${{ if eq(parameters.referenceType, 'Package') }}:
- task: DownloadPipelineArtifact@2
displayName: Download Abstractions Package Artifact
inputs:
artifactName: ${{ parameters.abstractionsArtifactName }}
targetPath: $(packagePath)
# Note that packages/ will have been created by the above step, which is a
# pre-requisite for configuring NuGet.
- template: ../steps/ci-prebuild-step.yml@self
parameters:
debug: ${{ parameters.debug }}
referenceType: ${{ parameters.referenceType }}

- template: ../steps/ci-project-build-step.yml@self
parameters:
platform: ${{ parameters.platform }}
configuration: ${{ parameters.configuration }}
referenceType: ${{ parameters.referenceType }}
operatingSystem: Windows
build: all
build: MDS
abstractionsPackageVersion: ${{parameters.abstractionsPackageVersion}}

- template: ../steps/generate-nuget-package-step.yml@self
parameters:
NugetPackageVersion: $(NugetPackageVersion)
packageVersion: ${{ parameters.mdsPackageVersion }}
configuration: $(Configuration)
nuspecPath: 'tools/specs/Microsoft.Data.SqlClient.nuspec'
OutputDirectory: $(packagePath)
outputDirectory: $(packagePath)
generateSymbolsPackage: false
properties: 'AbstractionsPackageVersion=$(abstractionsPackageVersion)'
displayName: 'Generate NuGet package M.D.SqlClient'
referenceType: ${{ parameters.referenceType }}
properties: 'AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }}'
displayName: 'Create MDS NuGet Package'

- template: ../steps/ci-project-build-step.yml@self
parameters:
platform: ${{ parameters.platform }}
configuration: ${{ parameters.configuration }}
referenceType: ${{ parameters.referenceType }}
operatingSystem: Windows
build: AKV
mdsPackageVersion: ${{parameters.mdsPackageVersion}}

- template: ../steps/generate-nuget-package-step.yml@self
parameters:
NugetPackageVersion: $(NugetPackageVersion)
packageVersion: $(akvPackageVersion)
configuration: $(Configuration)
nuspecPath: 'tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec'
OutputDirectory: $(packagePath)
outputDirectory: $(packagePath)
generateSymbolsPackage: false
properties: 'MdsPackageVersion=$(mdsPackageVersion)'
referenceType: ${{ parameters.referenceType }}
properties: 'MdsPackageVersion=${{ parameters.mdsPackageVersion }}'
installNuget: false
displayName: 'Generate NuGet package AKV Provider'
displayName: 'Create AKV NuGet Package'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Artifacts'
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact'
inputs:
PathtoPublish: $(packagePath)
ArtifactName: ${{ parameters.artifactName }}
targetPath: $(packagePath)
artifactName: ${{ parameters.mdsArtifactName }}
Loading
Loading