@@ -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 : GitClientPME-1ESHostedPool-intel-pc
56+ image : ubuntu-x86_64-ado1es
57+ os : linux
58+
4959variables :
5060 - name : ' esrpAppConnectionName'
5161 value : ' 1ESGitClient-ESRP-App'
@@ -456,3 +466,97 @@ extends:
456466 targetType : inline
457467 script : |
458468 unzip -uo $(Build.ArtifactStagingDirectory)/tosign/installers.zip -d $(Build.ArtifactStagingDirectory)/installers
469+
470+ #
471+ # Linux build jobs
472+ #
473+ - ${{ each dim in parameters.linux_matrix }} :
474+ - job : ${{ dim.id }}
475+ displayName : ${{ dim.jobName }}
476+ pool :
477+ name : ${{ dim.pool }}
478+ image : ${{ dim.image }}
479+ os : ${{ dim.os }}
480+ variables :
481+ version : $[stageDependencies.prebuild.vars.outputs['version.value']]
482+ templateContext :
483+ outputs :
484+ - output : pipelineArtifact
485+ targetPath : ' $(Build.ArtifactStagingDirectory)/payload'
486+ artifactName : ' ${{ dim.runtime }}_payload'
487+ - output : pipelineArtifact
488+ targetPath : ' $(Build.ArtifactStagingDirectory)/symbols'
489+ artifactName : ' ${{ dim.runtime }}_symbols'
490+ - output : pipelineArtifact
491+ targetPath : ' $(Build.ArtifactStagingDirectory)/installers'
492+ artifactName : ' ${{ dim.runtime }}_installers'
493+ steps :
494+ - checkout : self
495+ - task : UseDotNet@2
496+ displayName : ' Use .NET 8 SDK'
497+ inputs :
498+ packageType : sdk
499+ version : ' 8.x'
500+ - task : Bash@3
501+ displayName : ' Build payload'
502+ inputs :
503+ targetType : filePath
504+ filePath : ' ./src/linux/Packaging.Linux/layout.sh'
505+ arguments : |
506+ --runtime="${{ dim.runtime }}" \
507+ --configuration="Release" \
508+ --output="$(Build.ArtifactStagingDirectory)/payload" \
509+ --symbol-output="$(Build.ArtifactStagingDirectory)/symbols_raw"
510+ - task : Bash@3
511+ displayName : ' Build packages'
512+ inputs :
513+ targetType : filePath
514+ filePath : ' ./src/linux/Packaging.Linux/pack.sh'
515+ arguments : |
516+ --version="$(version)" \
517+ --runtime="${{ dim.runtime }}" \
518+ --payload="$(Build.ArtifactStagingDirectory)/payload" \
519+ --symbols="$(Build.ArtifactStagingDirectory)/symbols_raw" \
520+ --output="$(Build.ArtifactStagingDirectory)/pkg"
521+ - task : Bash@3
522+ displayName : ' Move symbol packages'
523+ inputs :
524+ targetType : inline
525+ script : |
526+ mkdir -p $(Build.ArtifactStagingDirectory)/symbols
527+ mv $(Build.ArtifactStagingDirectory)/pkg/tar/gcm-*-symbols.tar.gz $(Build.ArtifactStagingDirectory)/symbols
528+ - task : CopyFiles@2
529+ displayName : ' Collect packages for publishing'
530+ inputs :
531+ contents : |
532+ **/*.deb
533+ **/*.tar.gz
534+ sourceFolder : ' $(Build.ArtifactStagingDirectory)/pkg'
535+ targetFolder : ' $(Build.ArtifactStagingDirectory)/installers'
536+ - task : EsrpCodeSigning@5
537+ condition : and(succeeded(), eq('${{ parameters.esrp }}', true))
538+ displayName : ' Sign packages'
539+ inputs :
540+ connectedServiceName : ' $(esrpAppConnectionName)'
541+ useMSIAuthentication : true
542+ appRegistrationClientId : ' $(esrpClientId)'
543+ appRegistrationTenantId : ' $(esrpTenantId)'
544+ authAkvName : ' $(esrpKeyVaultName)'
545+ authSignCertName : ' $(esrpSignReqCertName)'
546+ serviceEndpointUrl : ' $(esrpEndpointUrl)'
547+ folderPath : ' $(Build.ArtifactStagingDirectory)/installers'
548+ pattern : |
549+ **/*.deb
550+ **/*.tar.gz
551+ useMinimatch : true
552+ signConfigType : inlineSignParams
553+ inlineOperation : |
554+ [
555+ {
556+ "KeyCode": "CP-453387-Pgp",
557+ "OperationCode": "LinuxSign",
558+ "ToolName": "sign",
559+ "ToolVersion": "1.0",
560+ "Parameters": {}
561+ }
562+ ]
0 commit comments