@@ -12,6 +12,10 @@ variables:
1212 moduleName : Microsoft.WinGet.RestSource
1313 sourceArtifactName : WinGet.RestSource-WinGet.PowerShell.Source
1414 downloadRoot : $(Pipeline.Workspace)\buildRelease\$(sourceArtifactName)
15+ azureFunctionArtifactName : WinGet.RestSource-WinGet.RestSource.Functions
16+ azureFunctionDownloadRoot : $(Pipeline.Workspace)\buildRelease\$(azureFunctionArtifactName)
17+ azureFunctionLegacyArtifactName : WinGet.RestSource-WinGet.RestSource.Functions.LegacySupport
18+ azureFunctionLegacyDownloadRoot : $(Pipeline.Workspace)\buildRelease\$(azureFunctionLegacyArtifactName)
1519
1620 # Docker image which is used to build the project
1721 WindowsContainerImage : ' onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'
@@ -49,7 +53,7 @@ extends:
4953 pool :
5054 type : windows
5155 variables :
52- ob_outputDirectory : $(Build.ArtifactStagingDirectory)/$(moduleName)
56+ ob_outputDirectory : $(Build.ArtifactStagingDirectory)
5357
5458 steps :
5559 - task : NuGetToolInstaller@1
@@ -90,11 +94,11 @@ extends:
9094 signing_profile : ' external_distribution'
9195 search_root : ' $(downloadRoot)'
9296 files_to_sign : |
93- Microsoft.WinGet.RestSource.psd1
94- Microsoft.WinGet.RestSource.psm1
95- Library/*.ps1
96- Library/WinGet.RestSource.PowershellSupport/Microsoft.WinGet.PowershellSupport.dll
97- Library/WinGet.RestSource.PowershellSupport/Microsoft.WinGet.RestSource.Utils.dll
97+ Microsoft.WinGet.RestSource.psd1;
98+ Microsoft.WinGet.RestSource.psm1;
99+ Library/*.ps1;
100+ Library/WinGet.RestSource.PowershellSupport/Microsoft.WinGet.PowershellSupport.dll;
101+ Library/WinGet.RestSource.PowershellSupport/Microsoft.WinGet.RestSource.Utils.dll;
98102
99103 - task : onebranch.pipeline.signing@1
100104 displayName : ' Sign 3rd party module files'
@@ -103,7 +107,11 @@ extends:
103107 cp_code : ' 135020002' # CP-231522 - Microsoft 3rd Party Application Component (SHA2)
104108 search_root : ' $(downloadRoot)'
105109 files_to_sign : |
106- Library/WinGet.RestSource.PowershellSupport/YamlDotNet.dll
110+ Library/WinGet.RestSource.PowershellSupport/YamlDotNet.dll;
111+
112+ - template : pipelines/templates/sign-azure-function.yml@self
113+ parameters :
114+ azureFunctionFolder : ' $(downloadRoot)\Data'
107115
108116 - task : CopyFiles@2
109117 displayName : Copy files to be published to staging directory
@@ -116,6 +124,40 @@ extends:
116124 Library/**
117125 Data/**
118126
127+ - download : buildRelease
128+ displayName : Download Azure Functions to sign
129+ artifact : $(azureFunctionArtifactName)
130+ patterns : ' **'
131+
132+ - template : pipelines/templates/sign-azure-function.yml@self
133+ parameters :
134+ azureFunctionFolder : ' $(azureFunctionDownloadRoot)'
135+
136+ - task : CopyFiles@2
137+ displayName : Copy Azure Functions to be published to staging directory
138+ inputs :
139+ SourceFolder : $(azureFunctionDownloadRoot)
140+ TargetFolder : $(Build.ArtifactStagingDirectory)/$(azureFunctionArtifactName)
141+ Contents : |
142+ **/*
143+
144+ - download : buildRelease
145+ displayName : Download Azure Functions Legacy to sign
146+ artifact : $(azureFunctionLegacyArtifactName)
147+ patterns : ' **'
148+
149+ - template : pipelines/templates/sign-azure-function.yml@self
150+ parameters :
151+ azureFunctionFolder : ' $(azureFunctionLegacyDownloadRoot)'
152+
153+ - task : CopyFiles@2
154+ displayName : Copy Azure Functions to be published to staging directory
155+ inputs :
156+ SourceFolder : $(azureFunctionLegacyDownloadRoot)
157+ TargetFolder : $(Build.ArtifactStagingDirectory)/$(azureFunctionLegacyArtifactName)
158+ Contents : |
159+ **/*
160+
119161 - stage : Publish
120162 displayName : Publish to PS Gallery
121163 dependsOn : Prepare
@@ -132,12 +174,9 @@ extends:
132174 inputs :
133175 - input : pipelineArtifact
134176 artifactName : drop_Prepare_Prepare_Sign
135- targetPath : $(System.DefaultWorkingDirectory)/ModuleToPublish/$(moduleName)
177+ targetPath : $(System.DefaultWorkingDirectory)/ModuleToPublish/
136178 itemPattern : |
137- *.psm1
138- *.psd1
139- Library/**
140- Data/**
179+ Microsoft.WinGet.RestSource/**
141180
142181 steps :
143182 - pwsh : |
0 commit comments