diff --git a/builds/build-pr.yml b/builds/build-pr.yml deleted file mode 100644 index ac330d8..0000000 --- a/builds/build-pr.yml +++ /dev/null @@ -1,43 +0,0 @@ -trigger: none - -pr: - branches: - include: - - main - -variables: - solution: '**/*.sln' - configuration: 'Debug' - -stages: -- stage: Build - displayName: 'PR Validation' - - jobs: - - job: BuildTest - displayName: 'Build and Test on' - - # Verifies cross-platform build and test - strategy: - matrix: - linux: - imageName: 'ubuntu-latest' - mac: - imageName: 'macos-latest' - windows: - imageName: 'windows-latest' - - pool: - vmImage: '$(imageName)' - - workspace: - clean: all - - steps: - - template: 'template-steps-build-test.yml' - parameters: - solution: '$(solution)' - configuration: '$(configuration)' - nugetVersion: '1.0.0' - runCodeSign: 'false' - dacFxPackageVersion: '' \ No newline at end of file diff --git a/builds/build-release.yml b/builds/build-release.yml deleted file mode 100644 index 623da18..0000000 --- a/builds/build-release.yml +++ /dev/null @@ -1,41 +0,0 @@ -# This pipeline is manually triggered -trigger: none - -pr: none - -variables: - solution: '**/*.sln' - configuration: 'Release' - versionMajor: 0 - versionMinor: 1 - versionMajorMinor: '$(versionMajor).$(versionMinor)' # This variable is only used for the counter - versionPatch: $[counter(variables['versionMajorMinor'], 0)] # This will reset when we bump either major or minor version - versionSuffix: 'preview' - nugetVersion: '$(versionMajor).$(versionMinor).$(versionPatch)-$(versionSuffix)' - -stages: -- stage: BuildPublish - displayName: 'Release Build and Publish' - - jobs: - - job: BuildTestPublish - displayName: 'Release: Build, Test, and Publish on Linux' - - pool: - vmImage: 'ubuntu-latest' - - workspace: - clean: all - - steps: - - template: 'template-steps-build-test.yml' - parameters: - solution: '$(solution)' - configuration: '$(configuration)' - nugetVersion: '$(nugetVersion)' - runCodeSign: 'true' - dacFxPackageVersion: '' - - - template: 'template-steps-publish.yml' - parameters: - configuration: '$(configuration)' diff --git a/builds/internal-nuget-build.yml b/builds/internal-nuget-build.yml deleted file mode 100644 index 5a80f3b..0000000 --- a/builds/internal-nuget-build.yml +++ /dev/null @@ -1,93 +0,0 @@ -trigger: none - -pr: none - -# Pipeline trigger - this pipeline will run whenever the 'DacFx-Official' pipeline finishes -resources: - pipelines: - - pipeline: 'latest-nuget-build-test' - source: 'DacFx-Official' - trigger: true - -variables: - solution: '**/*.sln' - configuration: 'Release' - dacFxPackagePattern: 'Microsoft.SqlServer.DacFx*.nupkg' - dacFxPackagePath: '$(Pipeline.Workspace)/pkg' # DacFx nupkg will be downloaded from nightly build and placed here - versionMajor: 0 - versionMinor: 1 - versionMajorMinor: '$(versionMajor).$(versionMinor)' # This variable is only used for the counter - versionPatch: $[counter(variables['versionMajorMinor'], 0)] # This will reset when we bump either major or minor version - versionSuffix: 'beta' - nugetVersion: '$(versionMajor).$(versionMinor).$(versionPatch)-$(versionSuffix)' - -stages: -- stage: Build - displayName: 'Nightly Push to Internal Feed' - jobs: - - job: BuildPush - displayName: 'Build and Push' - pool: - vmImage: 'ubuntu-latest' - workspace: - clean: all - - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' - inputs: - buildType: 'specific' - project: '$(azureProjectId)' - definition: '$(azureSourcePipelineId)' - buildVersionToDownload: 'latest' - specificBuildWithTriggering: true - allowPartiallySucceededBuilds: true - itemPattern: 'drop_build_main/release/$(dacFxPackagePattern)' - targetPath: '$(dacFxPackagePath)' - - # Note: The download task above preserves the relative folder structure - - script: 'dotnet nuget add source "$(dacFxPackagePath)/drop_build_main/release"' - displayName: 'Nuget Add Source to Path Containing DacFx Package' - - - task: PowerShell@2 - displayName: 'Extract Version from DacFx nupkg file' - inputs: - failOnStderr: true - targetType: 'inline' - script: | - # Locate the nupkg file from the package path - $files = Get-ChildItem "$(dacFxPackagePath)" -Recurse -Include "$(dacFxPackagePattern)" - Write-Host "DacFx package found in $files" - if ($files.length -eq 0) { - Write-Error "Failed to find Nuget package with pattern $(dacFxPackagePattern) in $(dacFxPackagePath)" - } - - # Parse the nupkg file name for the version number - $filename = Split-Path $files[0] -leaf - $version = $filename.Replace("Microsoft.SqlServer.DacFx.", "").Replace(".nupkg", "") - Write-Host "DacFx package version: $version" - Write-Host "##vso[task.setvariable variable=dacFxPackageVersion]$version" - - - template: 'template-steps-build-test.yml' - parameters: - solution: '$(solution)' - configuration: '$(configuration)' - nugetVersion: '$(nugetVersion)' - runCodeSign: 'true' - dacFxPackageVersionArgument: '-p:DacFxPackageVersion="$(dacFxPackageVersion)"' - - - template: 'template-steps-publish.yml' - parameters: - configuration: '$(configuration)' - - - task: NuGetAuthenticate@0 - displayName: 'NuGet Authenticate' - - - task: NuGetCommand@2 - displayName: 'Push NuGet Package' - inputs: - command: push - packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg' - publishVstsFeed: 'SQLDS_SSMS' - publishPackageMetadata: false - nuGetFeedType: 'internal' diff --git a/builds/latest-nuget-build-test.yml b/builds/latest-nuget-build-test.yml deleted file mode 100644 index 2677e14..0000000 --- a/builds/latest-nuget-build-test.yml +++ /dev/null @@ -1,84 +0,0 @@ -trigger: none - -pr: none - -# Pipeline trigger - this pipeline will run whenever the 'DacFx-Official' pipeline finishes -resources: - pipelines: - - pipeline: 'latest-nuget-build-test' - source: 'DacFx-Official' - trigger: true - -variables: - solution: '**/*.sln' - configuration: 'Debug' - dacFxPackagePattern: 'Microsoft.SqlServer.DacFx*.nupkg' - dacFxPackagePath: '$(Pipeline.Workspace)/pkg' # DacFx nupkg will be downloaded from nightly build and placed here - -stages: -- stage: Build - displayName: 'Nightly Build Test' - - jobs: - - job: BuildTest - displayName: 'Build and Test on' - - # Verifies cross-platform build and test - strategy: - matrix: - linux: - imageName: 'ubuntu-latest' - mac: - imageName: 'macos-latest' - windows: - imageName: 'windows-latest' - - pool: - vmImage: '$(imageName)' - - workspace: - clean: all - - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' - inputs: - buildType: 'specific' - project: '$(azureProjectId)' - definition: '$(azureSourcePipelineId)' - specificBuildWithTriggering: true - allowPartiallySucceededBuilds: true - buildVersionToDownload: 'latest' - itemPattern: 'drop_build_main/release/$(dacFxPackagePattern)' - targetPath: '$(dacFxPackagePath)' - - # Note: The download task above preserves the relative folder structure - - script: 'dotnet nuget add source "$(dacFxPackagePath)/drop_build_main/release"' - displayName: 'Nuget Add Source to Path Containing DacFx Package' - - - task: PowerShell@2 - displayName: 'Extract Version from DacFx nupkg file' - inputs: - failOnStderr: true - targetType: 'inline' - script: | - # Locate the nupkg file from the package path - $files = Get-ChildItem "$(dacFxPackagePath)" -Recurse -Include "$(dacFxPackagePattern)" - Write-Host "DacFx package found in $files" - if ($files.length -eq 0) { - Write-Error "Failed to find Nuget package with pattern $(dacFxPackagePattern) in $(dacFxPackagePath)" - } - - # Parse the nupkg file name for the version number - $filename = Split-Path $files[0] -leaf - $version = $filename.Replace("Microsoft.SqlServer.DacFx.", "").Replace(".nupkg", "") - Write-Host "DacFx package version: $version" - Write-Host "##vso[task.setvariable variable=dacFxPackageVersion]$version" - - - template: 'template-steps-build-test.yml' - parameters: - solution: '$(solution)' - configuration: '$(configuration)' - nugetVersion: '1.0.0' - runCodeSign: 'false' - dacFxPackageVersionArgument: '-p:DacFxPackageVersion="$(dacFxPackageVersion)"' diff --git a/builds/template-steps-build-test.yml b/builds/template-steps-build-test.yml deleted file mode 100644 index 909d8e7..0000000 --- a/builds/template-steps-build-test.yml +++ /dev/null @@ -1,159 +0,0 @@ -parameters: - configuration: '' - solution: '' - nugetVersion: '' - runCodeSign: '' - # This is mainly used for test pipelines to get version from Nuget build pipelines - # The version defined in the csproj will be used when this is not set - dacFxPackageVersionArgument: '' - -steps: -- task: UseDotNet@2 - displayName: 'Install .NET 3.1 SDK' - inputs: - version: '3.1.x' - -- task: UseDotNet@2 - displayName: 'Install .NET 5 SDK' - inputs: - version: '5.x' - -- task: UseDotNet@2 - displayName: 'Install .NET 6 SDK' - inputs: - version: '6.x' - -- task: UseDotNet@2 - displayName: 'Install .NET 7 SDK' - inputs: - version: '7.x' - -- task: UseDotNet@2 - displayName: 'Install .NET 8 SDK' - inputs: - version: '8.x' - includePreviewVersions: true - -# Don't generate package so we can sign it before packaging -- task: DotNetCoreCLI@2 - displayName: '.NET Build' - inputs: - command: build - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -p:GeneratePackageOnBuild=false ${{ parameters.dacFxPackageVersionArgument }}' - -# CodeSign is only run on release builds -- task: UseDotNet@2 - displayName: 'Install .NET Core SDK 2.1.x for CodeSign' - condition: '${{ parameters.runCodeSign }}' - inputs: - version: '2.1.x' - -# CodeSign DLLs included in the SDK -- task: EsrpCodeSigning@1 - displayName: 'ESRP CodeSigning - Binaries' - condition: '${{ parameters.runCodeSign }}' - inputs: - ConnectedServiceName: 'ESRP Codesign' - FolderPath: '$(Build.SourcesDirectory)/src/Microsoft.Build.Sql/tools' - Pattern: '*.dll' - signConfigType: inlineSignParams - inlineOperation: | - [ - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "DacFx" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "https://github.com/microsoft/DacFx" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "FileDigest", - "parameterValue": "/fd sha256" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - } - ], - "toolName": "signtool.exe", - "toolVersion": "6.2.9304.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolVerify", - "parameters": [ - { - "parameterName": "VerifyAll", - "parameterValue": "/all" - } - ], - "toolName": "signtool.exe", - "toolVersion": "6.2.9304.0" - } - ] - SessionTimeout: 600 - MaxConcurrency: 5 - -# Extra parameter GeneratePackageOnBuild=false is needed for issue https://github.com/dotnet/sdk/pull/3473#issuecomment-516612070 -- task: DotNetCoreCLI@2 - displayName: '.NET Pack Nuget' - inputs: - command: custom - custom: pack - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} --output $(Build.ArtifactStagingDirectory) --no-build -p:NuspecProperties="version=${{ parameters.nugetVersion }}" -p:GeneratePackageOnBuild=false -p:PackageVersion=${{ parameters.nugetVersion }}' - -- task: DotNetCoreCLI@2 - displayName: '.NET Test for .NET Core 3.1' - inputs: - command: test - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -f netcoreapp3.1' - env: - DOTNET_TOOL_PATH: '$(Agent.ToolsDirectory)/dotnet' - -- task: DotNetCoreCLI@2 - displayName: '.NET Test for .NET 5' - inputs: - command: test - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -f net5.0' - env: - DOTNET_TOOL_PATH: '$(Agent.ToolsDirectory)/dotnet' - -- task: DotNetCoreCLI@2 - displayName: '.NET Test for .NET 6' - inputs: - command: test - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -f net6.0' - env: - DOTNET_TOOL_PATH: '$(Agent.ToolsDirectory)/dotnet' - -- task: DotNetCoreCLI@2 - displayName: '.NET Test for .NET 7' - inputs: - command: test - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -f net7.0' - env: - DOTNET_TOOL_PATH: '$(Agent.ToolsDirectory)/dotnet' - -- task: DotNetCoreCLI@2 - displayName: '.NET Test for .NET 8' - inputs: - command: test - projects: '${{ parameters.solution }}' - arguments: '--configuration ${{ parameters.configuration }} -f net8.0' - env: - DOTNET_TOOL_PATH: '$(Agent.ToolsDirectory)/dotnet' diff --git a/builds/template-steps-publish.yml b/builds/template-steps-publish.yml deleted file mode 100644 index a578cfc..0000000 --- a/builds/template-steps-publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -parameters: - configuration: '' - -steps: -- task: UseDotNet@2 - displayName: 'Install .NET SDK 5.0.x for CodeSign' - inputs: - version: '5.0.x' - -- task: EsrpCodeSigning@1 - displayName: 'ESRP Code Signing - Nuget Package' - inputs: - ConnectedServiceName: 'ESRP Codesign' - FolderPath: '$(Build.ArtifactStagingDirectory)' - Pattern: '*.nupkg' - signConfigType: 'inlineSignParams' - inlineOperation: | - [ - { - "keyCode": "CP-401405", - "operationSetCode": "NuGetSign", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-401405", - "operationSetCode": "NuGetVerify", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - SessionTimeout: '60' - MaxConcurrency: '50' - MaxRetryAttempts: '5' - -- task: PublishPipelineArtifact@1 - displayName: 'Publish Pipeline Artifact' - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: 'drop' \ No newline at end of file