Skip to content

Commit d6b3c7c

Browse files
committed
.azure-pipelines/release.yml: add Linux builds
Add Linux release build definitions on Azure Pipelines. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 9a1a107 commit d6b3c7c

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

.azure-pipelines/release.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ parameters:
4646
image: macOS-latest
4747
os: macos
4848

49+
- name: linux_matrix
50+
type: object
51+
default:
52+
- id: linux_x64
53+
jobName: 'Linux (x64)'
54+
runtime: linux-x64
55+
pool: GitClient-1ESHostedPool-intel-pc
56+
image: ubuntu-x86_64-ado1es
57+
os: linux
58+
4959
variables:
5060
- name: 'esrpConnectionName'
5161
value: '1ESGitClient-ESRP'
@@ -335,3 +345,91 @@ extends:
335345
# }
336346
# }
337347
# ]
348+
349+
#
350+
# Linux build jobs
351+
#
352+
- ${{ each dim in parameters.linux_matrix }}:
353+
- job: ${{ dim.id }}
354+
displayName: ${{ dim.jobName }}
355+
pool:
356+
name: ${{ dim.pool }}
357+
image: ${{ dim.image }}
358+
os: ${{ dim.os }}
359+
templateContext:
360+
outputs:
361+
- output: pipelineArtifact
362+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
363+
artifactName: '${{ dim.runtime }}_payload'
364+
- output: pipelineArtifact
365+
targetPath: '$(Build.ArtifactStagingDirectory)/symbols'
366+
artifactName: '${{ dim.runtime }}_symbols'
367+
- output: pipelineArtifact
368+
targetPath: '$(Build.ArtifactStagingDirectory)/installers'
369+
artifactName: '${{ dim.runtime }}_installers'
370+
steps:
371+
- checkout: self
372+
- task: Bash@3
373+
displayName: 'Get version'
374+
inputs:
375+
targetType: inline
376+
script: |
377+
echo "##vso[task.setvariable variable=VERSION]$(cat ./VERSION | sed -E 's/.[0-9]+$//')"
378+
- task: UseDotNet@2
379+
displayName: 'Use .NET 8 SDK'
380+
inputs:
381+
packageType: sdk
382+
version: '8.x'
383+
- task: Bash@3
384+
displayName: 'Build payload'
385+
inputs:
386+
targetType: filePath
387+
filePath: './src/linux/Packaging.Linux/layout.sh'
388+
arguments: |
389+
--runtime="${{ dim.runtime }}" \
390+
--configuration="Release" \
391+
--output="$(Build.ArtifactStagingDirectory)/payload" \
392+
--symbol-output="$(Build.ArtifactStagingDirectory)/symbols"
393+
- task: Bash@3
394+
displayName: 'Build packages'
395+
inputs:
396+
targetType: filePath
397+
filePath: './src/linux/Packaging.Linux/pack.sh'
398+
arguments: |
399+
--version="$(VERSION)" \
400+
--runtime="${{ dim.runtime }}" \
401+
--payload="$(Build.ArtifactStagingDirectory)/payload" \
402+
--symbols="$(Build.ArtifactStagingDirectory)/symbols" \
403+
--output="$(Build.ArtifactStagingDirectory)/pkg"
404+
- task: CopyFiles@2
405+
displayName: 'Collect packages for publishing'
406+
inputs:
407+
contents: |
408+
**/*.deb
409+
**/*.tar.gz
410+
sourceFolder: '$(Build.ArtifactStagingDirectory)/pkg'
411+
targetFolder: '$(Build.ArtifactStagingDirectory)/installers'
412+
# - task: EsrpCodeSigning@5
413+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
414+
# displayName: 'Sign packages'
415+
# inputs:
416+
# connectedServiceName: '$(esrpConnectionName)'
417+
# appRegistrationClientId: '$(esrpClientId)'
418+
# appRegistrationTenantId: '$(esrpTenantId)'
419+
# authAkvName: '$(esrpAuthAkvName)'
420+
# authCertName: '$(esrpAuthCertName)'
421+
# authSignCertName: '$(esrpAuthSignCertName)'
422+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
423+
# folderPath: '$(Build.ArtifactStagingDirectory)/installers'
424+
# pattern: '**/*'
425+
# signConfigType: inlineSignParams
426+
# inlineOperation: |
427+
# [
428+
# {
429+
# "KeyCode": "CP-453387-Pgp",
430+
# "OperationCode": "LinuxSign",
431+
# "ToolName": "sign",
432+
# "ToolVersion": "1.0",
433+
# "Parameters": {}
434+
# }
435+
# ]

0 commit comments

Comments
 (0)