Skip to content

Commit

Permalink
Merged PR 4529: eng | fix a few issues and improvements
Browse files Browse the repository at this point in the history
- Fixed a typo, publish symbols, and commit number
- Updated the cron for daily run in case of any code changes, besides the weekly run
- Added parameters instead of pipeline's variables
- TSA, SBOM, and CodeQL tools moved out of the `syncSdl` for compatibility with OneBranch's NonOfficial template

Related work items: #29920
  • Loading branch information
DavoudEshtehari committed Apr 26, 2024
1 parent 4bce7de commit f05be20
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
# The .NET Foundation licenses this file to you under the MIT license. #
# See the LICENSE file in the project root for more information. #
#################################################################################
parameters:
- name: symbolsFolder
type: string
default: symbols

- name: softwareFolder
type: string
default: software

- name: publishSymbols
type: boolean

jobs:
- job: build_signed_akv_package
pool:
Expand Down Expand Up @@ -54,6 +66,7 @@ jobs:
referenceType: package
symbolsVersion: ${{variables.AKVNuGetPackageVersion }}
product: AKV
publishSymbols: ${{ parameters['PublishSymbols'] }}

# Publish symbols to public server
- template: ../steps/publish-symbols-step.yml@self
Expand All @@ -62,3 +75,4 @@ jobs:
referenceType: package
symbolsVersion: ${{variables.AKVNuGetPackageVersion }}
product: AKV
publishSymbols: ${{ parameters['PublishSymbols'] }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ parameters:
- name: symbolsFolder
type: string
default: symbols

- name: softwareFolder
type: string
default: software

- name: publishSymbols
type: boolean

jobs:
- job: build_signed_package
pool:
Expand Down Expand Up @@ -49,7 +53,10 @@ jobs:
- template: ../steps/publish-symbols-step.yml@self
parameters:
SymAccount: $(PrivateSymAccount)
publishSymbols: ${{ parameters['PublishSymbols'] }}

# Publish symbols to public server
- template: ../steps/publish-symbols-step.yml@self
parameters:
SymAccount: $(PublicSymAccount)
publishSymbols: ${{ parameters['PublishSymbols'] }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# See the LICENSE file in the project root for more information. #
#################################################################################
parameters:
- name: CommitHead
type: string
default: '' # the value will grab from the repo's head

- name: nuspecPath
type: string
default: '$(nuspecPath)'
Expand Down Expand Up @@ -43,4 +39,4 @@ steps:
displayName: 'NuGet pack with snupkg'
inputs:
command: custom
arguments: 'pack -Symbols -SymbolPackageFormat snupkg ${{parameters.nuspecPath}} -Version ${{parameters.NugetPackageVersion}} -OutputDirectory ${{parameters.OutputDirectory}} -properties "COMMITID=${{parameters.CommitHead}};Configuration=${{parameters.Configuration}};ReferenceType=${{parameters.referenceType}}"'
arguments: 'pack -Symbols -SymbolPackageFormat snupkg ${{parameters.nuspecPath}} -Version ${{parameters.NugetPackageVersion}} -OutputDirectory ${{parameters.OutputDirectory}} -properties "COMMITID=$(CommitHead);Configuration=${{parameters.Configuration}};ReferenceType=${{parameters.referenceType}}"'
7 changes: 4 additions & 3 deletions eng/pipelines/common/templates/steps/publish-symbols-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
- name: SymAccount
type: string

- name: PublishSymbols
- name: publishSymbols
type: string
default: '$(PublishSymbols)'

Expand All @@ -31,6 +31,7 @@ parameters:
steps:
- powershell: 'Write-Host "##vso[task.setvariable variable=ArtifactServices.Symbol.AccountName;]${{parameters.SymAccount}}"'
displayName: 'Update Symbol.AccountName ${{parameters.SymAccount}}'
condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})

- ${{ if eq(parameters.product, 'MDS') }}:
- task: PublishSymbols@2
Expand All @@ -45,7 +46,7 @@ steps:
SymbolsMaximumWaitTime: 60
SymbolsProduct: Microsoft.Data.SqlClient
SymbolsVersion: '{{parameters.symbolsVersion }}'
condition: and(succeeded(), eq('${{ parameters.PublishSymbols }}', 'true'))
condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})

- ${{ if eq(parameters.product, 'AKV') }}:
- task: PublishSymbols@2
Expand All @@ -60,4 +61,4 @@ steps:
SymbolsMaximumWaitTime: 60
SymbolsProduct: Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
SymbolsVersion: '{{parameters.symbolsVersion }}'
condition: and(succeeded(), eq('${{ parameters.PublishSymbols }}', 'true'))
condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})
56 changes: 43 additions & 13 deletions eng/pipelines/dotnet-sqlclient-signing-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trigger:
include:
- internal/main
paths:
exclude:
include:
- src
- eng
- tools
Expand All @@ -21,8 +21,15 @@ trigger:
- '*.sh'

schedules:
- cron: '30 21 * * 0'
displayName: Weekly Sunday 9:30 pm Build
- cron: '30 4 * * Mon'
displayName: Weekly Sunday 9:30 PM (UTC - 7) Build
branches:
include:
- internal/main
always: true

- cron: '30 3 * * Mon-Fri'
displayName: Mon-Fri 8:30 PM (UTC - 7) Build
branches:
include:
- internal/main
Expand All @@ -33,10 +40,31 @@ parameters: # parameters are shown up in ADO UI in a build queue time
type: boolean
default: true

- name: publishSymbols
displayName: 'Publish symbols'
type: boolean
default: false
- name: MDS_PackageRef_Version
displayName: 'MDS package version of AKV Provider (build AKV)'
type: string
default: 5.1.5
- name: CurrentNetFxVersion
displayName: 'Lowest supported .NET Framework version (MDS validation)'
type: string
default: 'net462'

variables:
- template: /eng/pipelines/libraries/variables.yml@self
- name: packageFolderName
value: drop_buildMDS_build_signed_package
- name: PublishSymbols
value: ${{ parameters['publishSymbols'] }}
- name: MDS_PackageRef_Version
value: ${{ parameters['MDS_PackageRef_Version'] }}
- name: CurrentNetFxVersion
value: ${{ parameters['CurrentNetFxVersion'] }}
- name: ProductVersion #MDS product version (MDS validation)
value: $(NUGETPACKAGEVERSION)

resources:
repositories:
Expand All @@ -57,10 +85,17 @@ extends:
symbolsFolder: $(symbolsFolder)
softwarename: Microsoft.Data.SqlClient
versionNumber: $(AssemblyFileVersion)
tsa:
enabled: true # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
codeql:
compiled:
enabled: true
sbom:
enabled: true
packageName: Microsoft.Data.SqlClient
packageVersion: $(NugetPackageVersion)
asyncSdl:
enabled: false
tsa:
enabled: true # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
enabled: false
credscan:
enabled: true
suppressionsFile: $(REPOROOT)/.config/CredScanSuppressions.json
Expand All @@ -80,13 +115,6 @@ extends:
break: true
publishLogs:
enabled: true
sbom:
enabled: true
packageName: Microsoft.Data.SqlClient
pacakgeVersion: $(NugetPackageVersion)
codeql:
compiled:
enabled: true
tsaOptionsPath: $(REPOROOT)\.config\tsaoptions.json
disableLegacyManifest: true
stages:
Expand All @@ -96,13 +124,15 @@ extends:
parameters:
symbolsFolder: $(symbolsFolder)
softwareFolder: $(softwareFolder)
publishSymbols: ${{ parameters['publishSymbols'] }}

- stage: buildMDS
jobs:
- template: eng/pipelines/common/templates/jobs/build-signed-package-job.yml@self
parameters:
symbolsFolder: $(symbolsFolder)
softwareFolder: $(softwareFolder)
publishSymbols: ${{ parameters['publishSymbols'] }}

- stage: package_validation
dependsOn: buildMDS
Expand Down

0 comments on commit f05be20

Please sign in to comment.