|
| 1 | +################################################################################# |
| 2 | +# Licensed to the .NET Foundation under one or more agreements. # |
| 3 | +# The .NET Foundation licenses this file to you under the MIT license. # |
| 4 | +# See the LICENSE file in the project root for more information. # |
| 5 | +################################################################################# |
| 6 | + |
| 7 | +name: $(Year:YY)$(DayOfYear)$(Rev:.r) |
| 8 | + |
| 9 | +parameters: |
| 10 | + - name: buildConfiguration |
| 11 | + displayName: 'Build configuration' |
| 12 | + type: 'string' |
| 13 | + values: |
| 14 | + - 'Release' |
| 15 | + - 'Debug' |
| 16 | + default: 'Release' |
| 17 | + |
| 18 | + - name: publishSymbols |
| 19 | + displayName: 'Publish symbols' |
| 20 | + type: 'boolean' |
| 21 | + default: false |
| 22 | + |
| 23 | + - name: runSdlTasks |
| 24 | + displayName: 'Run SDL Tasks' |
| 25 | + type: 'boolean' |
| 26 | + default: true |
| 27 | + |
| 28 | +variables: |
| 29 | + - template: /eng/pipelines/variables/common-variables.yml@self |
| 30 | + - template: /eng/pipelines/variables/onebranch-variables.yml@self |
| 31 | + - template: /eng/pipelines/variables/esrp-signing-variables.yml@self |
| 32 | + - template: /eng/pipelines/variables/akv-official-variables.yml@self |
| 33 | + |
| 34 | +resources: |
| 35 | + repositories: |
| 36 | + - repository: templates |
| 37 | + type: 'git' |
| 38 | + name: 'OneBranch.Pipelines/GovernedTemplates' |
| 39 | + ref: 'refs/heads/main' |
| 40 | + |
| 41 | +extends: |
| 42 | + template: 'v2/OneBranch.NonOfficial.CrossPlat.yml@templates' |
| 43 | + |
| 44 | + parameters: |
| 45 | + featureFlags: |
| 46 | + WindowsHostVersion: |
| 47 | + Version: '2022' |
| 48 | + |
| 49 | + globalSdl: |
| 50 | + # See https://aka.ms/obpipelines/sdl |
| 51 | + |
| 52 | + apiscan: |
| 53 | + enabled: ${{ parameters.runSdlTasks }} |
| 54 | + softwareFolder: '${{ variables.apiScanDllPath }}' |
| 55 | + softwareName: 'Microsoft.Data.SqlClient' # Note: This name is registered with ApiScan |
| 56 | + softwareVersionNum: '${{ variables.assemblyFileVersion }}' |
| 57 | + symbolsFolder: '${{ variables.apiScanPdbPath }}' |
| 58 | + |
| 59 | + armory: |
| 60 | + enabled: ${{ parameters.runSdlTasks }} |
| 61 | + break: true |
| 62 | + |
| 63 | + asyncSdl: |
| 64 | + # If this should be enabled, move supported tools under this item, |
| 65 | + # see https://aka.ms/obpipelines/asyncsdl |
| 66 | + enabled: false |
| 67 | + |
| 68 | + binskim: |
| 69 | + enabled: ${{ parameters.runSdlTasks }} |
| 70 | + break: true |
| 71 | + |
| 72 | + codeinspector: |
| 73 | + enabled: ${{ parameters.runSdlTasks }} |
| 74 | + logLevel: Error |
| 75 | + |
| 76 | + codeql: |
| 77 | + enabled: ${{ parameters.runSdlTasks }} |
| 78 | + sourceRoot: '$(REPO_ROOT)/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider' |
| 79 | + # Note, this can only be done if project doesn't depend on other projects. In |
| 80 | + # package reference mode, this is true, but if we ever enable project reference |
| 81 | + # builds, this will have to be removed. |
| 82 | + |
| 83 | + credscan: |
| 84 | + enabled: ${{ parameters.runSdlTasks }} |
| 85 | + suppressionsFile: '$(REPO_ROOT)/.config/CredScanSuppressions.json' |
| 86 | + |
| 87 | + eslint: |
| 88 | + enabled: false |
| 89 | + |
| 90 | + policheck: |
| 91 | + enabled: ${{ parameters.runSdlTasks }} |
| 92 | + break: true |
| 93 | + exclusionFile: '$(REPO_ROOT)/.config/PolicheckExclusions.xml' |
| 94 | + |
| 95 | + roslyn: |
| 96 | + enabled: ${{ parameters.runSdlTasks }} |
| 97 | + break: true |
| 98 | + # Requires RoslynAnalyzers task to be added somewhere in the build stage. |
| 99 | + |
| 100 | + publishLogs: |
| 101 | + enabled: ${{ parameters.runSdlTasks }} |
| 102 | + |
| 103 | + sbom: |
| 104 | + enabled: ${{ parameters.runSdlTasks }} |
| 105 | + packageName: 'Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider' |
| 106 | + packageVersion: ${{ variables.akvPackageVersion }} |
| 107 | + |
| 108 | + tsa: |
| 109 | + # OneBranch publishes all sdl results to TSA. If TSA is disabled all SDL tools will |
| 110 | + # be forced into 'break' build mode. |
| 111 | + enabled: false |
| 112 | + configFile: '$(REPO_ROOT)/.config/tsaoptions.json' |
| 113 | + |
| 114 | + stages: |
| 115 | + - stage: BuildAkv |
| 116 | + displayName: 'Build AKV' |
| 117 | + jobs: |
| 118 | + - template: /eng/pipelines/jobs/build-akv-official-job.yml@self |
| 119 | + parameters: |
| 120 | + akvAssemblyFileVersion: '${{ variables.assemblyFileVersion }}' |
| 121 | + akvPackageVersion: '${{ variables.akvPackageVersion }}' |
| 122 | + apiScanDllPath: '${{ variables.apiScanDllPath }}' |
| 123 | + apiScanPdbPath: '${{ variables.apiScanPdbPath }}' |
| 124 | + buildConfiguration: '${{ parameters.buildConfiguration }}' |
| 125 | + mdsPackageVersion: '${{ variables.mdsPackageVersion }}' |
| 126 | + publishSymbols: '${{ parameters.publishSymbols }}' |
| 127 | + signingAppRegistrationClientId: '$(SigningAppRegistrationClientId)' |
| 128 | + signingAppRegistrationTenantId: '$(SigningAppRegistrationTenantId)' |
| 129 | + signingAuthAkvName: '$(SigningAuthAkvName)' |
| 130 | + signingAuthSignCertName: '$(SigningAuthSignCertName)' |
| 131 | + signingEsrpClientId: '$(SigningEsrpClientId)' |
| 132 | + signingEsrpConnectedServiceName: '$(SigningEsrpConnectedServiceName)' |
| 133 | + symbolsAzureSubscription: '$(SymbolsAzureSubscription)' |
| 134 | + symbolsPublishProjectName: '$(SymbolsPublishProjectName)' |
| 135 | + symbolsPublishServer: '$(SymbolsPublishServer)' |
| 136 | + symbolsPublishTokenUri: '$(SymbolsPublishTokenUri)' |
| 137 | + symbolsUploadAccount: '$(SymbolsUploadAccount)' |
0 commit comments