2019-01-22 20:21:02 +01:00
|
|
|
parameters:
|
|
|
|
parentJobs: []
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: WinPackageSigningJob
|
2019-03-21 18:24:49 +01:00
|
|
|
displayName: Windows Package signing and upload
|
2019-01-22 20:21:02 +01:00
|
|
|
dependsOn:
|
|
|
|
${{ parameters.parentJobs }}
|
|
|
|
condition: succeeded()
|
|
|
|
pool:
|
2020-07-14 21:08:45 +02:00
|
|
|
name: Package ES Standard Build
|
2019-01-22 20:21:02 +01:00
|
|
|
variables:
|
|
|
|
BuildConfiguration: release
|
|
|
|
BuildPlatform: any cpu
|
|
|
|
|
|
|
|
steps:
|
2020-10-23 20:42:24 +02:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
2019-01-22 20:21:02 +01:00
|
|
|
|
2019-08-28 18:44:02 +02:00
|
|
|
- template: shouldSign.yml
|
2019-02-01 00:10:19 +01:00
|
|
|
- template: SetVersionVariables.yml
|
|
|
|
parameters:
|
|
|
|
ReleaseTagVar: $(ReleaseTagVar)
|
2019-01-22 20:21:02 +01:00
|
|
|
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download artifacts'
|
|
|
|
inputs:
|
2019-03-21 18:24:49 +01:00
|
|
|
buildType: current
|
|
|
|
downloadType: single
|
|
|
|
artifactName: signed
|
|
|
|
downloadPath: '$(System.ArtifactsDirectory)'
|
2019-01-22 20:21:02 +01:00
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
dir "$(System.ArtifactsDirectory)\*" -Recurse
|
|
|
|
displayName: 'Capture Downloaded Artifacts'
|
|
|
|
# Diagnostics is not critical it passes every time it runs
|
|
|
|
continueOnError: true
|
|
|
|
|
|
|
|
- powershell: |
|
2019-04-16 02:07:15 +02:00
|
|
|
$authenticodefiles = @(
|
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x64.msi"
|
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x86.msi"
|
2020-05-29 19:26:30 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
$msixFiles = @(
|
2019-11-05 22:03:44 +01:00
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x86.msix"
|
2019-04-16 02:07:15 +02:00
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x64.msix"
|
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-arm32.msix"
|
|
|
|
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-arm64.msix"
|
|
|
|
)
|
2020-05-29 19:26:30 +02:00
|
|
|
|
|
|
|
tools/releaseBuild/generatePackgeSigning.ps1 -AuthenticodeFiles $authenticodeFiles -path "$(System.ArtifactsDirectory)\package.xml" -MsixCertType $env:MSIX_TYPE -MsixFiles $msixFiles
|
2019-01-22 20:21:02 +01:00
|
|
|
displayName: 'Generate Package Signing Xml'
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Get-Content "$(System.ArtifactsDirectory)\package.xml"
|
|
|
|
displayName: 'Capture signing xml'
|
|
|
|
|
|
|
|
- task: PkgESCodeSign@10
|
|
|
|
displayName: 'CodeSign $(System.ArtifactsDirectory)\package.xml'
|
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
inputs:
|
|
|
|
signConfigXml: '$(System.ArtifactsDirectory)\package.xml'
|
|
|
|
outPathRoot: '$(Build.StagingDirectory)\signedPackages'
|
2019-02-26 00:06:01 +01:00
|
|
|
binVersion: $(SigingVersion)
|
|
|
|
binVersionOverride: $(SigningVersionOverride)
|
2019-08-28 18:44:02 +02:00
|
|
|
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
new-item -itemtype Directory -path '$(Build.StagingDirectory)\signedPackages'
|
|
|
|
Get-ChildItem "$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-*.msi*" | copy-item -Destination '$(Build.StagingDirectory)\signedPackages'
|
|
|
|
displayName: 'Fake Signing'
|
|
|
|
condition: and(succeeded(), ne(variables['SHOULD_SIGN'], 'true'))
|
2019-01-22 20:21:02 +01:00
|
|
|
|
2019-01-30 23:10:52 +01:00
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: x86
|
2019-02-01 00:10:19 +01:00
|
|
|
version: $(version)
|
2019-01-30 23:10:52 +01:00
|
|
|
|
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: x64
|
2019-02-01 00:10:19 +01:00
|
|
|
version: $(version)
|
2020-03-21 20:36:10 +01:00
|
|
|
pdb: yes
|
2019-01-30 23:10:52 +01:00
|
|
|
|
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: arm32
|
2019-02-01 00:10:19 +01:00
|
|
|
version: $(version)
|
2019-01-30 23:10:52 +01:00
|
|
|
msi: no
|
|
|
|
|
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: arm64
|
2019-02-01 00:10:19 +01:00
|
|
|
version: $(version)
|
2019-01-30 23:10:52 +01:00
|
|
|
msi: no
|
|
|
|
|
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: fxdependent
|
2019-02-01 00:10:19 +01:00
|
|
|
version: $(version)
|
2019-01-30 23:10:52 +01:00
|
|
|
msi: no
|
2019-04-16 02:07:15 +02:00
|
|
|
msix: no
|
2019-01-22 20:21:02 +01:00
|
|
|
|
2019-07-13 02:18:11 +02:00
|
|
|
- template: upload.yml
|
|
|
|
parameters:
|
|
|
|
architecture: fxdependentWinDesktop
|
|
|
|
version: $(version)
|
|
|
|
msi: no
|
|
|
|
msix: no
|
|
|
|
|
2019-01-22 20:21:02 +01:00
|
|
|
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
|
2019-02-01 00:10:19 +01:00
|
|
|
displayName: 'Run Defender Scan'
|
2019-03-29 23:18:55 +01:00
|
|
|
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
|
|
displayName: 'Component Detection'
|
|
|
|
inputs:
|
|
|
|
sourceScanPath: '$(Build.SourcesDirectory)'
|
|
|
|
snapshotForceEnabled: true
|