|
| 1 | +steps: |
| 2 | +- task: PkgESSetupBuild@10 |
| 3 | + displayName: 'Initialize build' |
| 4 | + env: |
| 5 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 6 | + inputs: |
| 7 | + useDfs: false |
| 8 | + productName: PowerShellCore |
| 9 | + branchVersion: true |
| 10 | + disableWorkspace: true |
| 11 | + disableBuildTools: true |
| 12 | + disableNugetPack: true |
| 13 | + condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual')) |
| 14 | + |
| 15 | +- task: DownloadBuildArtifacts@0 |
| 16 | + inputs: |
| 17 | + buildType: current |
| 18 | + artifactName: release |
| 19 | + |
| 20 | +- powershell: | |
| 21 | + $zipFilePath = '$(System.ArtifactsDirectory)\release\$(ARCHITECTURE)-symbols.zip' |
| 22 | + Get-ChildItem $zipFilePath -Verbose |
| 23 | +
|
| 24 | + Expand-Archive $zipFilePath -Destination '$(System.ArtifactsDirectory)\Expanded' -Force |
| 25 | +
|
| 26 | + $vstsCommandString = "vso[task.setvariable variable=Symbols]$(System.ArtifactsDirectory)\Expanded" |
| 27 | + Write-Host "sending " + $vstsCommandString |
| 28 | + Write-Host "##$vstsCommandString" |
| 29 | + displayName: Expand artifact $(ARCHITECTURE)-symbols.zip |
| 30 | + |
| 31 | +- task: PowerShell@2 |
| 32 | + displayName: 'Update Signing Xml' |
| 33 | + inputs: |
| 34 | + targetType: filePath |
| 35 | + filePath: $(Build.SourcesDirectory)/tools/releaseBuild/updateSigning.ps1 |
| 36 | + |
| 37 | +- task: PkgESCodeSign@10 |
| 38 | + displayName: 'CodeSign $(ARCHITECTURE)' |
| 39 | + env: |
| 40 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 41 | + inputs: |
| 42 | + signConfigXml: '$(Build.SourcesDirectory)\tools\releaseBuild\signing.xml' |
| 43 | + inPathRoot: '$(Symbols)' |
| 44 | + outPathRoot: '$(Symbols)\Signed' |
| 45 | + condition: ne(variables['SKIP_SIGNING'], 'True') |
| 46 | + |
| 47 | +- powershell: | |
| 48 | + Compress-Archive -Path '$(Symbols)\Signed\*' -DestinationPath '$(Symbols)\Signed\win-$(ARCHITECTURE).zip' |
| 49 | + displayName: Compress signed binaries |
| 50 | + condition: ne(variables['SKIP_SIGNING'], 'True') |
| 51 | + |
| 52 | +- powershell: | |
| 53 | + Get-ChildItem -Path '$(Symbols)\*' -Recurse | Copy-Item -Destination '$(Symbols)\Signed' -Force -Verbose |
| 54 | + displayName: Copy unsigned binaries as signing is skipped |
| 55 | + condition: eq(variables['SKIP_SIGNING'], 'True') |
| 56 | + |
| 57 | +- template: uploadArtifact.yml |
| 58 | + parameters: |
| 59 | + artifactPath: '$(Symbols)\Signed' |
| 60 | + artifactFilter: 'win-*.zip' |
| 61 | + artifactName: 'signed' |
| 62 | + |
| 63 | +- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3 |
| 64 | + displayName: 'Run MpCmdRun.exe' |
| 65 | + |
| 66 | +- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
| 67 | + displayName: 'Component Detection' |
| 68 | + inputs: |
| 69 | + sourceScanPath: '$(Build.SourcesDirectory)' |
0 commit comments