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