11parameters :
2- dependsOn : []
32 PublishRidAgnosticPackagesFromPlatform : ' '
43 isOfficialBuild : false
54 logArtifactName : ' Logs-PrepareSignedArtifacts_Attempt$(System.JobAttempt)'
65
76jobs :
8- - job : PrepareSignedArtifacts
9- displayName : Prepare Signed Artifacts
10- dependsOn : ${{ parameters.dependsOn }}
11- pool :
12- name : $(DncEngInternalBuildPool)
13- demands : ImageOverride -equals 1es-windows-2022
14- # Double the default timeout.
15- timeoutInMinutes : 240
16- workspace :
17- clean : all
7+ - template : /eng/common/templates-official/job/job.yml
8+ parameters :
9+ name : ' PrepareSignedArtifacts'
10+ displayName : ' Prepare Signed Artifacts'
1811
19- variables :
20- - name : SignType
21- value : $[ coalesce(variables.OfficialSignType, 'real') ]
12+ pool :
13+ name : $(DncEngInternalBuildPool)
14+ demands : ImageOverride -equals 1es-windows-2022
2215
23- templateContext :
24- outputs :
25- - output : pipelineArtifact
26- displayName : ' Publish BuildLogs'
27- condition : succeededOrFailed()
28- targetPath : ' $(Build.StagingDirectory)\BuildLogs'
29- artifactName : ${{ parameters.logArtifactName }}
16+ # Double the default timeout.
17+ timeoutInMinutes : 240
3018
31- steps :
32- - checkout : self
33- clean : true
34- fetchDepth : 20
19+ workspace :
20+ clean : all
3521
36- - ${{ if eq(parameters.isOfficialBuild, true) }} :
37- - task : NuGetAuthenticate@1
22+ enableMicrobuild : true
3823
39- - task : MicroBuildSigningPlugin@2
40- displayName : Install MicroBuild plugin for Signing
41- inputs :
42- signType : $(SignType)
43- zipSources : false
44- feedSource : https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
45- continueOnError : false
46- condition : and(succeeded(),
47- in(variables['SignType'], 'real', 'test'))
48-
49- - task : DownloadBuildArtifacts@0
50- displayName : Download IntermediateArtifacts
51- inputs :
52- artifactName : IntermediateArtifacts
53- downloadPath : $(Build.SourcesDirectory)\artifacts\PackageDownload
54- checkDownloadedFiles : true
55-
56- - script : >-
57- build.cmd -ci
58- -subset publish
59- -configuration Release
60- /p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }}
61- /p:OfficialBuildId=$(Build.BuildNumber)
62- /p:SignType=$(SignType)
63- /p:DotNetSignType=$(SignType)
64- /bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog
65- displayName: Prepare artifacts and upload to build
66-
67- - task : CopyFiles@2
68- displayName : Copy Files to $(Build.StagingDirectory)\BuildLogs
69- inputs :
70- SourceFolder : ' $(Build.SourcesDirectory)'
71- Contents : |
72- **/*.log
73- **/*.binlog
74- TargetFolder : ' $(Build.StagingDirectory)\BuildLogs'
75- continueOnError : true
76- condition : succeededOrFailed()
24+ variables :
25+ - name : ' _SignType'
26+ value : $[ coalesce(variables.OfficialSignType, 'real') ]
27+
28+ templateContext :
29+ inputs :
30+ - input : checkout
31+ repository : self
32+ clean : true
33+ fetchDepth : 20
34+ - input : pipelineArtifact
35+ artifactName : IntermediateArtifacts
36+ targetPath : $(Build.SourcesDirectory)\artifacts\PackageDownload
37+ outputs :
38+ - output : pipelineArtifact
39+ displayName : ' Publish BuildLogs'
40+ condition : succeededOrFailed()
41+ targetPath : ' $(Build.StagingDirectory)\BuildLogs'
42+ artifactName : ${{ parameters.logArtifactName }}
43+
44+ steps :
45+ - script : >-
46+ build.cmd -ci
47+ -subset publish
48+ -configuration Release
49+ /p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }}
50+ /p:OfficialBuildId=$(Build.BuildNumber)
51+ /p:SignType=$(_SignType)
52+ /p:DotNetSignType=$(_SignType)
53+ /bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog
54+ displayName: Prepare artifacts and upload to build
55+
56+ - task : CopyFiles@2
57+ displayName : Copy Files to $(Build.StagingDirectory)\BuildLogs
58+ inputs :
59+ SourceFolder : ' $(Build.SourcesDirectory)'
60+ Contents : |
61+ **/*.log
62+ **/*.binlog
63+ TargetFolder : ' $(Build.StagingDirectory)\BuildLogs'
64+ continueOnError : true
65+ condition : succeededOrFailed()
0 commit comments