@@ -52,14 +52,16 @@ parameters:
5252 - id : macos_x64
5353 jobName : ' macOS (x64)'
5454 runtime : osx-x64
55- pool : ' Azure Pipelines'
56- image : macOS-latest
55+ pool : AcesShared
56+ # Use the image override to issue a demand as this is a self-hosted pool
57+ imageOverride : ACES_VM_SharedPool_GoldenGate
5758 os : macos
5859 - id : macos_arm64
5960 jobName : ' macOS (ARM64)'
6061 runtime : osx-arm64
61- pool : ' Azure Pipelines'
62- image : macOS-latest
62+ pool : AcesShared
63+ # Use the image override to issue a demand as this is a self-hosted pool
64+ imageOverride : ACES_VM_SharedPool_GoldenGate
6365 os : macos
6466
6567 - name : linux_matrix
@@ -80,6 +82,11 @@ parameters:
8082 image : ubuntu-arm64-ado1es
8183 os : linux
8284
85+ - name : ' dotnet_tool'
86+ type : boolean
87+ default : true
88+ displayName : ' Build .NET Tool'
89+
8390variables :
8491 - name : ' esrpAppConnectionName'
8592 value : ' 1ESGitClient-ESRP-App'
@@ -274,8 +281,11 @@ extends:
274281 displayName : ${{ dim.jobName }}
275282 pool :
276283 name : ${{ dim.pool }}
277- image : ${{ dim.image }}
278284 os : ${{ dim.os }}
285+ ${{ if ne(dim.imageOverride, '') }} :
286+ demands : ImageOverride -equals ${{ dim.imageOverride }}
287+ ${{ else }} :
288+ image : ${{ dim.image }}
279289 templateContext :
280290 outputs :
281291 - output : pipelineArtifact
@@ -503,86 +513,104 @@ extends:
503513 #
504514 # .NET tool build job
505515 #
506- - job : dotnet_tool
507- displayName : ' .NET Tool NuGet Package'
508- # The tool is portable IL and doesn't require platform-specific
509- # builds. Linux is the fastest hosted agent to provision so use it!
510- pool :
511- name : GitClientPME-1ESHostedPool-intel-pc
512- image : ubuntu-x86_64-ado1es
513- os : linux
514- hostArchitecture : amd64
515- templateContext :
516- outputs :
517- - output : pipelineArtifact
518- targetPath : ' $(Build.ArtifactStagingDirectory)/_final'
519- artifactName : ' dotnet-tool'
520- steps :
521- - checkout : self
522- - task : CopyFiles@2
523- displayName : ' Use Central Feed Services (CFS)'
524- inputs :
525- SourceFolder : ' $(Build.SourcesDirectory)/.azure-pipelines'
526- Contents : ' nuget.config'
527- TargetFolder : ' $(Build.SourcesDirectory)'
528- Overwrite : true
529- - task : NuGetAuthenticate@1
530- displayName : ' Authenticate to NuGet feeds'
531- - task : UseDotNet@2
532- displayName : ' Use .NET 10 SDK'
533- inputs :
534- packageType : sdk
535- version : ' 10.x'
536- - task : Bash@3
537- displayName : ' Publish payload'
538- inputs :
539- targetType : filePath
540- filePath : ' ./build/dntool/publish.sh'
541- arguments : --configuration release
542- # ESRP-sign (Authenticode) the managed assemblies before packing
543- - ${{ if eq(parameters.esrp, true) }} :
544- - template : .azure-pipelines/esrp/sign.yml@self
545- parameters :
546- displayName : ' Sign payload'
547- folderPath : ' $(Build.SourcesDirectory)/out/publish/dntool/release'
548- pattern : ' **/*.dll'
549- inlineOperation : |
550- [
551- {
552- "KeyCode": "CP-230012",
553- "OperationCode": "SigntoolSign",
554- "ToolName": "sign",
555- "ToolVersion": "1.0",
556- "Parameters": {
557- "OpusName": "Microsoft",
558- "OpusInfo": "https://www.microsoft.com",
559- "FileDigest": "/fd SHA256",
560- "PageHash": "/NPH",
561- "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
516+ - ${{ if eq(parameters.dotnet_tool, true) }} :
517+ - job : dotnet_tool
518+ displayName : ' .NET Tool NuGet Package'
519+ # The tool is portable IL and doesn't require platform-specific
520+ # builds. Linux is the fastest hosted agent to provision so use it!
521+ pool :
522+ name : GitClientPME-1ESHostedPool-intel-pc
523+ image : ubuntu-x86_64-ado1es
524+ os : linux
525+ hostArchitecture : amd64
526+ templateContext :
527+ outputs :
528+ - output : pipelineArtifact
529+ targetPath : ' $(Build.ArtifactStagingDirectory)/_final'
530+ artifactName : ' dotnet-tool'
531+ steps :
532+ - checkout : self
533+ - task : CopyFiles@2
534+ displayName : ' Use Central Feed Services (CFS)'
535+ inputs :
536+ SourceFolder : ' $(Build.SourcesDirectory)/.azure-pipelines'
537+ Contents : ' nuget.config'
538+ TargetFolder : ' $(Build.SourcesDirectory)'
539+ Overwrite : true
540+ - task : NuGetAuthenticate@1
541+ displayName : ' Authenticate to NuGet feeds'
542+ - task : UseDotNet@2
543+ displayName : ' Use .NET 10 SDK'
544+ inputs :
545+ packageType : sdk
546+ version : ' 10.x'
547+ - task : Bash@3
548+ displayName : ' Publish payload'
549+ inputs :
550+ targetType : filePath
551+ filePath : ' ./build/dntool/publish.sh'
552+ arguments : --configuration release
553+ # ESRP-sign (Authenticode) the managed assemblies before packing
554+ - ${{ if eq(parameters.esrp, true) }} :
555+ - template : .azure-pipelines/esrp/sign.yml@self
556+ parameters :
557+ displayName : ' Sign payload'
558+ folderPath : ' $(Build.SourcesDirectory)/out/publish/dntool/release'
559+ pattern : ' **/*.dll'
560+ inlineOperation : |
561+ [
562+ {
563+ "KeyCode": "CP-230012",
564+ "OperationCode": "SigntoolSign",
565+ "ToolName": "sign",
566+ "ToolVersion": "1.0",
567+ "Parameters": {
568+ "OpusName": "Microsoft",
569+ "OpusInfo": "https://www.microsoft.com",
570+ "FileDigest": "/fd SHA256",
571+ "PageHash": "/NPH",
572+ "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
573+ }
574+ },
575+ {
576+ "KeyCode": "CP-230012",
577+ "OperationCode": "SigntoolVerify",
578+ "ToolName": "sign",
579+ "ToolVersion": "1.0",
580+ "Parameters": {}
562581 }
563- },
564- {
565- "KeyCode": "CP-230012",
566- "OperationCode": "SigntoolVerify",
567- "ToolName": "sign",
568- "ToolVersion": "1.0",
569- "Parameters": {}
570- }
571- ]
572- # Pack the signed payload into the .nupkg
573- - task : Bash@3
574- displayName : ' Create NuGet packages'
575- inputs :
576- targetType : filePath
577- filePath : ' ./build/dntool/pack.sh'
578- arguments : --configuration release
579- - task : Bash@3
580- displayName : ' Collect artifacts for publishing'
581- inputs :
582- targetType : inline
583- script : |
584- mkdir -p $(Build.ArtifactStagingDirectory)/_final
585- cp $(Build.SourcesDirectory)/out/package/release/*.nupkg $(Build.ArtifactStagingDirectory)/_final
582+ ]
583+ # Pack the signed payload into the .nupkg
584+ - task : Bash@3
585+ displayName : ' Create NuGet packages'
586+ inputs :
587+ targetType : filePath
588+ filePath : ' ./build/dntool/pack.sh'
589+ arguments : --configuration release
590+ # ESRP-sign the NuGet package itself
591+ - ${{ if eq(parameters.esrp, true) }} :
592+ - template : .azure-pipelines/esrp/sign.yml@self
593+ parameters :
594+ displayName : ' Sign payload'
595+ folderPath : ' $(Build.SourcesDirectory)/out/package/release'
596+ pattern : ' **/*.nupkg'
597+ inlineOperation : |
598+ [
599+ {
600+ "KeyCode": "CP-401405",
601+ "OperationCode": "NuGetSign",
602+ "ToolName": "sign",
603+ "ToolVersion": "1.0",
604+ "Parameters": {}
605+ }
606+ ]
607+ - task : Bash@3
608+ displayName : ' Collect artifacts for publishing'
609+ inputs :
610+ targetType : inline
611+ script : |
612+ mkdir -p $(Build.ArtifactStagingDirectory)/_final
613+ cp $(Build.SourcesDirectory)/out/package/release/*.nupkg $(Build.ArtifactStagingDirectory)/_final
586614
587615 - stage : release
588616 displayName : ' Release'
0 commit comments