1
+ parameters :
2
+ - name : arch
3
+ type : string
4
+ - name : displayName
5
+ type : string
6
+
7
+ jobs :
8
+ - job : AssembleArtifact${{ parameters.displayName }}
9
+ displayName : " Assemble ${{ parameters.arch }}"
10
+ templateContext :
11
+ inputs :
12
+ - input : pipelineArtifact
13
+ pipeline : core-tools-host
14
+ artifactName : drop-coretools-host-linux-signed
15
+ targetPath : $(Pipeline.Workspace)\core-tools-host\drop-coretools-host-linux-signed
16
+ - input : pipelineArtifact
17
+ pipeline : core-tools-host
18
+ artifactName : drop-coretools-host-windows
19
+ targetPath : $(Pipeline.Workspace)\core-tools-host\drop-coretools-host-windows
20
+ - input : pipelineArtifact
21
+ pipeline : core-tools-inproc
22
+ artifactName : drop-inproc6
23
+ targetPath : $(Pipeline.Workspace)\core-tools-inproc\drop-inproc6
24
+ - input : pipelineArtifact
25
+ pipeline : core-tools-inproc
26
+ artifactName : drop-inproc8
27
+ targetPath : $(Pipeline.Workspace)\core-tools-inproc\drop-inproc8
28
+ - input : pipelineArtifact
29
+ pipeline : core-tools-default
30
+ artifactName : drop
31
+ targetPath : $(Pipeline.Workspace)\core-tools-default\drop
32
+
33
+ outputParentDirectory : $(Build.ArtifactStagingDirectory)
34
+ outputs :
35
+ - output : pipelineArtifact
36
+ displayName : Publish assembled artifact ${{ parameters.arch }}
37
+ targetPath : $(Build.ArtifactStagingDirectory)/core-tools
38
+ artifact : drop-${{ parameters.arch }}
39
+ - output : pipelineArtifact
40
+ displayName : Publish metadata.json
41
+ targetPath : $(Build.ArtifactStagingDirectory)/metadata.json
42
+ artifact : drop-metadata-json
43
+ condition : and(succeeded(), eq('${{ parameters.arch }}', 'min.win-x64'))
44
+
45
+ steps :
46
+ - checkout : self
47
+
48
+ - task : DotNetCoreCLI@2
49
+ displayName : " Run ArtifactAssembler"
50
+ inputs :
51
+ command : run
52
+ projects : " $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/Azure.Functions.ArtifactAssembler.csproj"
53
+ arguments : ' -c release -- "Azure.Functions.Cli.${{ parameters.arch }}"'
54
+ workingDirectory : ' $(Pipeline.Workspace)'
55
+
56
+ - ${{ if eq(parameters.arch, 'min.win-x64') }} :
57
+ - task : PowerShell@2
58
+ displayName : ' Generate metadata.json file'
59
+ inputs :
60
+ targetType : filePath
61
+ filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateMetadataFile.ps1'
62
+ arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging"'
63
+ workingDirectory : ' $(Pipeline.Workspace)'
64
+
65
+ - ${{ if startsWith(parameters.arch, 'win') }} :
66
+ - task : PowerShell@2
67
+ displayName : ' Generate MSI files'
68
+ inputs :
69
+ targetType : filePath
70
+ filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateMsiFiles.ps1'
71
+ arguments : ' -ArtifactsPath "$(Pipeline.Workspace)\staging\coretools-cli"'
72
+ workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
73
+
74
+ - ${{ if startsWith(parameters.arch, 'win-x') }} :
75
+ - template : ci/sign-files.yml@eng
76
+ parameters :
77
+ displayName : Sign MSI files
78
+ folderPath : $(Pipeline.Workspace)\staging\coretools-cli
79
+ pattern : ' *.msi'
80
+ signType : ' inline'
81
+ inlineOperation : |
82
+ [
83
+ {
84
+ "KeyCode": "CP-230012",
85
+ "OperationCode": "SigntoolSign",
86
+ "Parameters": {
87
+ "OpusName": "Microsoft",
88
+ "OpusInfo": "http://www.microsoft.com",
89
+ "FileDigest": "/fd \"SHA256\"",
90
+ "PageHash": "/NPH",
91
+ "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
92
+ },
93
+ "ToolName": "sign",
94
+ "ToolVersion": "1.0"
95
+ },
96
+ {
97
+ "KeyCode": "CP-230012",
98
+ "OperationCode": "SigntoolVerify",
99
+ "Parameters": {},
100
+ "ToolName": "sign",
101
+ "ToolVersion": "1.0"
102
+ }
103
+ ]
104
+
105
+ - ${{ if eq(parameters.arch, 'min.win-x64') }} :
106
+ - task : PowerShell@2
107
+ displayName : ' Test Artifacts - Visual Studio'
108
+ inputs :
109
+ targetType : filePath
110
+ filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/testVsArtifacts.ps1'
111
+ arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging\coretools-visualstudio"'
112
+ workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
113
+
114
+ - ${{ if startsWith(parameters.arch, 'win') }} :
115
+ - task : PowerShell@2
116
+ displayName : ' Test Artifacts'
117
+ inputs :
118
+ targetType : filePath
119
+ filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/testArtifacts.ps1'
120
+ arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging\coretools-cli"'
121
+ workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
122
+
123
+ - task : DotNetCoreCLI@2
124
+ displayName : ' Zip Artifacts'
125
+ inputs :
126
+ command : run
127
+ projects : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/Azure.Functions.ArtifactAssembler.csproj'
128
+ arguments : ' --no-build -c release -- zip'
129
+ workingDirectory : ' $(Pipeline.Workspace)'
130
+
131
+ - task : PowerShell@2
132
+ displayName : ' Generate SHA files'
133
+ inputs :
134
+ targetType : filePath
135
+ filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateSha.ps1'
136
+ arguments : ' -CurrentDirectory "$(Pipeline.Workspace)"'
137
+
138
+ - task : CopyFiles@2
139
+ displayName : ' Copy Files to Artifact Staging Directory'
140
+ inputs :
141
+ SourceFolder : ' $(Pipeline.Workspace)/staging'
142
+ Contents : ' coretools-*/**'
143
+ TargetFolder : ' $(Build.ArtifactStagingDirectory)/core-tools'
144
+
145
+ - ${{ if eq(parameters.arch, 'min.win-x64') }} :
146
+ - task : CopyFiles@2
147
+ displayName : ' Copy metadata.json to Artifact Staging Directory'
148
+ inputs :
149
+ SourceFolder : ' $(Pipeline.Workspace)/staging'
150
+ Contents : ' metadata.json'
151
+ TargetFolder : ' $(Build.ArtifactStagingDirectory)'
0 commit comments