Skip to content

Commit

Permalink
Revert "Removing signing references from PR pipeline (#2363)"
Browse files Browse the repository at this point in the history
This reverts commit 056dddb.
  • Loading branch information
kburtram committed Jul 20, 2024
1 parent bc07e65 commit 0f945f1
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 1 deletion.
28 changes: 27 additions & 1 deletion azure-pipelines/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,30 @@ stages:
- ImageOverride -equals ADS-Windows_Image
steps:
- template: build.yml
timeoutInMinutes: 90
timeoutInMinutes: 150 # temporary while investigating timeout occurring in STS Product Build pipeline; should return to 90 after

# In order to run on arm64 macOS the executables must be at least self-signed, but dotnet publish step only does it when publishing on macOS.
# More information: https://github.com/dotnet/runtime/issues/49091
- job: CodeSign_osx_arm64_executables
pool:
vmImage: 'macos-latest'
dependsOn:
- Build
steps:
- template: osx-arm64-signing.yml

- stage: Release
variables:
- name: skipComponentGovernanceDetection
value: true
dependsOn:
- Build
condition: and(succeeded(), eq(variables['RELEASE'], 'true'))
pool:
name: 'ads-build-1es-hosted-pool'
demands:
- ImageOverride -equals ADS-Linux_Image
jobs:
- job: Release
steps:
- template: release.yml
161 changes: 161 additions & 0 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,139 @@ steps:
verbose: false
customCommand: 'install -g gulp-cli'

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning - SNK only'
inputs:
ConnectedServiceName: 'Code Signing'
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/default/net472/'
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-235847-SN",
"operationSetCode" : "StrongNameSign",
"Parameters" : [],
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-235847-SN",
"operationSetCode" : "StrongNameVerify",
"Parameters" : [],
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: 600
MaxConcurrency: 5

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning - sha256 only'
inputs:
ConnectedServiceName: 'Code Signing'
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish'
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll,MicrosoftSqlToolsCredentials.exe,MicrosoftSqlToolsServiceLayer.exe,SqlSerializationService.exe,SqlToolsResourceProviderService.exe,Microsoft.SqlTools.Hosting.dll,Microsoft.SqlTools.ResourceProvider.Core.dll,Microsoft.SqlTools.ResourceProvider.DefaultImpl.dll,MicrosoftSqlToolsCredentials.dll,MicrosoftSqlToolsServiceLayer.dll,Newtonsoft.Json.dll,SqlSerializationService.dll,SqlToolsResourceProviderService.dll,System.Data.SqlClient.dll,System.Net.Sockets.dll,MicrosoftSqlToolsMigration.exe,MicrosoftSqlToolsMigration.dll,Microsoft.SqlTools.SqlCore.dll,Microsoft.SqlTools.Authentication.dll,MicrosoftKustoServiceLayer.dll,MicrosoftKustoServiceLayer.exe,MicrosoftKustoServiceLayer.resources.dll,MicrosoftSqlTools*.resources.dll,Microsoft.SqlTools*.resources.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "SQL Tools Service"
},
{
"parameterName": "OpusInfo",
"parameterValue": "https://github.com/microsoft/sqltoolsservice"
},
{
"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

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP SqlCore CodeSigning - sha256 only'
inputs:
ConnectedServiceName: 'Code Signing'
FolderPath: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.SqlCore/bin/$(buildConfiguration)'
Pattern: 'Microsoft.SqlTools.*.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "SQL Tools Service"
},
{
"parameterName": "OpusInfo",
"parameterValue": "https://github.com/microsoft/sqltoolsservice"
},
{
"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

- task: DotNetCoreCLI@2
displayName: 'dotnet pack sqlcore'
inputs:
Expand All @@ -182,6 +315,34 @@ steps:
filename: build.cmd
arguments: "-target=dotnetpackservicetools -mono"

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP Code Signing - Nuget Package'
inputs:
ConnectedServiceName: 'Code Signing'
FolderPath: '$(Build.SourcesDirectory)/artifacts/nugetPackages'
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'

- ${{ each project in parameters.projects }}:
- ${{ each platform in parameters.platforms }}:
- task: ArchiveFiles@1
Expand Down

0 comments on commit 0f945f1

Please sign in to comment.