@@ -18,6 +18,7 @@ parameters:
1818#
1919# 1ES Pipeline Templates do not allow using a matrix strategy so we create
2020# a YAML object parameter with and foreach to create jobs for each entry.
21+ # Each OS has its own matrix object since their build steps differ.
2122#
2223 - name : windows_matrix
2324 type : object
@@ -29,6 +30,22 @@ parameters:
2930 image : win-x86_64-ado1es
3031 os : windows
3132
33+ - name : macos_matrix
34+ type : object
35+ default :
36+ - id : macos_x64
37+ jobName : ' macOS (x64)'
38+ runtime : osx-x64
39+ pool : ' Azure Pipelines'
40+ image : macOS-latest
41+ os : macos
42+ - id : macos_arm64
43+ jobName : ' macOS (ARM64)'
44+ runtime : osx-arm64
45+ pool : ' Azure Pipelines'
46+ image : macOS-latest
47+ os : macos
48+
3249variables :
3350 - name : ' esrpConnectionName'
3451 value : ' 1ESGitClient-ESRP'
@@ -180,3 +197,141 @@ extends:
180197 # "Parameters": {}
181198 # }
182199 # ]
200+
201+ #
202+ # macOS build jobs
203+ #
204+ - ${{ each dim in parameters.macos_matrix }} :
205+ - job : ${{ dim.id }}
206+ displayName : ${{ dim.jobName }}
207+ pool :
208+ name : ${{ dim.pool }}
209+ image : ${{ dim.image }}
210+ os : ${{ dim.os }}
211+ templateContext :
212+ outputs :
213+ - output : pipelineArtifact
214+ targetPath : ' $(Build.ArtifactStagingDirectory)/payload'
215+ artifactName : ' ${{ dim.runtime }}_payload'
216+ - output : pipelineArtifact
217+ targetPath : ' $(Build.ArtifactStagingDirectory)/symbols'
218+ artifactName : ' ${{ dim.runtime }}_symbols'
219+ - output : pipelineArtifact
220+ targetPath : ' $(Build.ArtifactStagingDirectory)/installers'
221+ artifactName : ' ${{ dim.runtime }}_installers'
222+ steps :
223+ - checkout : self
224+ - task : Bash@3
225+ displayName : ' Get version'
226+ inputs :
227+ targetType : inline
228+ script : |
229+ echo "##vso[task.setvariable variable=VERSION]$(cat ./VERSION | sed -E 's/.[0-9]+$//')"
230+ - task : UseDotNet@2
231+ displayName : ' Use .NET 8 SDK'
232+ inputs :
233+ packageType : sdk
234+ version : ' 8.x'
235+ - task : Bash@3
236+ displayName : ' Build payload'
237+ inputs :
238+ targetType : filePath
239+ filePath : ' ./src/osx/Installer.Mac/layout.sh'
240+ arguments : |
241+ --runtime="${{ dim.runtime }}" \
242+ --configuration="Release" \
243+ --output="$(Build.ArtifactStagingDirectory)/payload" \
244+ --symbol-output="$(Build.ArtifactStagingDirectory)/symbols"
245+ # - task: EsrpCodeSigning@5
246+ # condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
247+ # displayName: 'Sign payload'
248+ # inputs:
249+ # connectedServiceName: '$(esrpConnectionName)'
250+ # appRegistrationClientId: '$(esrpClientId)'
251+ # appRegistrationTenantId: '$(esrpTenantId)'
252+ # authAkvName: '$(esrpAuthAkvName)'
253+ # authCertName: '$(esrpAuthCertName)'
254+ # authSignCertName: '$(esrpAuthSignCertName)'
255+ # serviceEndpointUrl: '$(esrpEndpointUrl)'
256+ # folderPath: '$(Build.ArtifactStagingDirectory)/payload'
257+ # pattern: '**/*'
258+ # signConfigType: inlineSignParams
259+ # inlineOperation: |
260+ # [
261+ # {
262+ # "KeyCode": "CP-401337-Apple",
263+ # "OperationCode": "MacAppDeveloperSign",
264+ # "ToolName": "sign",
265+ # "ToolVersion": "1.0",
266+ # "Parameters": {}
267+ # }
268+ # ]
269+ - task : Bash@3
270+ displayName : ' Build component package'
271+ inputs :
272+ targetType : filePath
273+ filePath : ' ./src/osx/Installer.Mac/pack.sh'
274+ arguments : |
275+ --version="$(VERSION)" \
276+ --payload="$(Build.ArtifactStagingDirectory)/payload" \
277+ --output="$(Build.ArtifactStagingDirectory)/pkg/com.microsoft.gitcredentialmanager.component.pkg"
278+ - task : Bash@3
279+ displayName : ' Build installer package'
280+ inputs :
281+ targetType : filePath
282+ filePath : ' ./src/osx/Installer.Mac/dist.sh'
283+ arguments : |
284+ --version="$(VERSION)" \
285+ --runtime="${{ dim.runtime }}" \
286+ --package-path="$(Build.ArtifactStagingDirectory)/pkg" \
287+ --output="$(Build.ArtifactStagingDirectory)/installers/gcm-${{ dim.runtime }}-$(VERSION).pkg"
288+ # - task: EsrpCodeSigning@5
289+ # condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
290+ # displayName: 'Sign installer package'
291+ # inputs:
292+ # connectedServiceName: '$(esrpConnectionName)'
293+ # appRegistrationClientId: '$(esrpClientId)'
294+ # appRegistrationTenantId: '$(esrpTenantId)'
295+ # authAkvName: '$(esrpAuthAkvName)'
296+ # authCertName: '$(esrpAuthCertName)'
297+ # authSignCertName: '$(esrpAuthSignCertName)'
298+ # serviceEndpointUrl: '$(esrpEndpointUrl)'
299+ # folderPath: '$(Build.ArtifactStagingDirectory)/installers'
300+ # pattern: '**/*'
301+ # signConfigType: inlineSignParams
302+ # inlineOperation: |
303+ # [
304+ # {
305+ # "KeyCode": "CP-233029-Apple",
306+ # "OperationCode": "MacAppThirdPartySign",
307+ # "ToolName": "sign",
308+ # "ToolVersion": "1.0",
309+ # "Parameters": {}
310+ # }
311+ # ]
312+ # - task: EsrpCodeSigning@5
313+ # condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
314+ # displayName: 'Notarize installer package'
315+ # inputs:
316+ # connectedServiceName: '$(esrpConnectionName)'
317+ # appRegistrationClientId: '$(esrpClientId)'
318+ # appRegistrationTenantId: '$(esrpTenantId)'
319+ # authAkvName: '$(esrpAuthAkvName)'
320+ # authCertName: '$(esrpAuthCertName)'
321+ # authSignCertName: '$(esrpAuthSignCertName)'
322+ # serviceEndpointUrl: '$(esrpEndpointUrl)'
323+ # folderPath: '$(Build.ArtifactStagingDirectory)/installers'
324+ # pattern: '**/*'
325+ # signConfigType: inlineSignParams
326+ # inlineOperation: |
327+ # [
328+ # {
329+ # "KeyCode": "CP-401337-Apple",
330+ # "OperationCode": "MacAppNotarize",
331+ # "ToolName": "sign",
332+ # "ToolVersion": "1.0",
333+ # "Parameters": {
334+ # "BundleId": "com.microsoft.gitcredentialmanager"
335+ # }
336+ # }
337+ # ]
0 commit comments