Skip to content
Merged
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
213 changes: 112 additions & 101 deletions .azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ parameters:
- id: macos_x64
jobName: 'macOS (x64)'
runtime: osx-x64
pool: 'Azure Pipelines'
image: macOS-latest
pool: AcesShared
# Use the image override to issue a demand as this is a self-hosted pool
imageOverride: ACES_VM_SharedPool_GoldenGate
os: macos
- id: macos_arm64
jobName: 'macOS (ARM64)'
runtime: osx-arm64
pool: 'Azure Pipelines'
image: macOS-latest
pool: AcesShared
# Use the image override to issue a demand as this is a self-hosted pool
imageOverride: ACES_VM_SharedPool_GoldenGate
os: macos

- name: linux_matrix
Expand All @@ -80,6 +82,11 @@ parameters:
image: ubuntu-arm64-ado1es
os: linux

- name: 'dotnet_tool'
type: boolean
default: true
displayName: 'Build .NET Tool'

variables:
- name: 'esrpAppConnectionName'
value: '1ESGitClient-ESRP-App'
Expand Down Expand Up @@ -274,8 +281,11 @@ extends:
displayName: ${{ dim.jobName }}
pool:
name: ${{ dim.pool }}
image: ${{ dim.image }}
os: ${{ dim.os }}
${{ if ne(dim.imageOverride, '') }}:
demands: ImageOverride -equals ${{ dim.imageOverride }}
${{ else }}:
image: ${{ dim.image }}
templateContext:
outputs:
- output: pipelineArtifact
Expand Down Expand Up @@ -503,103 +513,104 @@ extends:
#
# .NET tool build job
#
- job: dotnet_tool
displayName: '.NET Tool NuGet Package'
# The tool is portable IL and doesn't require platform-specific
# builds. Linux is the fastest hosted agent to provision so use it!
pool:
name: GitClientPME-1ESHostedPool-intel-pc
image: ubuntu-x86_64-ado1es
os: linux
hostArchitecture: amd64
templateContext:
outputs:
- output: pipelineArtifact
targetPath: '$(Build.ArtifactStagingDirectory)/_final'
artifactName: 'dotnet-tool'
steps:
- checkout: self
- task: CopyFiles@2
displayName: 'Use Central Feed Services (CFS)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/.azure-pipelines'
Contents: 'nuget.config'
TargetFolder: '$(Build.SourcesDirectory)'
Overwrite: true
- task: NuGetAuthenticate@1
displayName: 'Authenticate to NuGet feeds'
- task: UseDotNet@2
displayName: 'Use .NET 10 SDK'
inputs:
packageType: sdk
version: '10.x'
- task: Bash@3
displayName: 'Publish payload'
inputs:
targetType: filePath
filePath: './build/dntool/publish.sh'
arguments: --configuration release
# ESRP-sign (Authenticode) the managed assemblies before packing
- ${{ if eq(parameters.esrp, true) }}:
- template: .azure-pipelines/esrp/sign.yml@self
parameters:
displayName: 'Sign payload'
folderPath: '$(Build.SourcesDirectory)/out/publish/dntool/release'
pattern: '**/*.dll'
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "https://www.microsoft.com",
"FileDigest": "/fd SHA256",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
- ${{ if eq(parameters.dotnet_tool, true) }}:
- job: dotnet_tool
displayName: '.NET Tool NuGet Package'
# The tool is portable IL and doesn't require platform-specific
# builds. Linux is the fastest hosted agent to provision so use it!
pool:
name: GitClientPME-1ESHostedPool-intel-pc
image: ubuntu-x86_64-ado1es
os: linux
hostArchitecture: amd64
templateContext:
outputs:
- output: pipelineArtifact
targetPath: '$(Build.ArtifactStagingDirectory)/_final'
artifactName: 'dotnet-tool'
steps:
- checkout: self
- task: CopyFiles@2
displayName: 'Use Central Feed Services (CFS)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/.azure-pipelines'
Contents: 'nuget.config'
TargetFolder: '$(Build.SourcesDirectory)'
Overwrite: true
- task: NuGetAuthenticate@1
displayName: 'Authenticate to NuGet feeds'
- task: UseDotNet@2
displayName: 'Use .NET 10 SDK'
inputs:
packageType: sdk
version: '10.x'
- task: Bash@3
displayName: 'Publish payload'
inputs:
targetType: filePath
filePath: './build/dntool/publish.sh'
arguments: --configuration release
# ESRP-sign (Authenticode) the managed assemblies before packing
- ${{ if eq(parameters.esrp, true) }}:
- template: .azure-pipelines/esrp/sign.yml@self
parameters:
displayName: 'Sign payload'
folderPath: '$(Build.SourcesDirectory)/out/publish/dntool/release'
pattern: '**/*.dll'
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "https://www.microsoft.com",
"FileDigest": "/fd SHA256",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {}
}
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {}
}
]
# Pack the signed payload into the .nupkg
- task: Bash@3
displayName: 'Create NuGet packages'
inputs:
targetType: filePath
filePath: './build/dntool/pack.sh'
arguments: --configuration release
# ESRP-sign the NuGet package itself
- ${{ if eq(parameters.esrp, true) }}:
- template: .azure-pipelines/esrp/sign.yml@self
parameters:
displayName: 'Sign payload'
folderPath: '$(Build.SourcesDirectory)/out/package/release'
pattern: '**/*.nupkg'
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {}
}
]
- task: Bash@3
displayName: 'Collect artifacts for publishing'
inputs:
targetType: inline
script: |
mkdir -p $(Build.ArtifactStagingDirectory)/_final
cp $(Build.SourcesDirectory)/out/package/release/*.nupkg $(Build.ArtifactStagingDirectory)/_final
]
# Pack the signed payload into the .nupkg
- task: Bash@3
displayName: 'Create NuGet packages'
inputs:
targetType: filePath
filePath: './build/dntool/pack.sh'
arguments: --configuration release
# ESRP-sign the NuGet package itself
- ${{ if eq(parameters.esrp, true) }}:
- template: .azure-pipelines/esrp/sign.yml@self
parameters:
displayName: 'Sign payload'
folderPath: '$(Build.SourcesDirectory)/out/package/release'
pattern: '**/*.nupkg'
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {}
}
]
- task: Bash@3
displayName: 'Collect artifacts for publishing'
inputs:
targetType: inline
script: |
mkdir -p $(Build.ArtifactStagingDirectory)/_final
cp $(Build.SourcesDirectory)/out/package/release/*.nupkg $(Build.ArtifactStagingDirectory)/_final
- stage: release
displayName: 'Release'
Expand Down
Loading