2019-01-22 20:21:02 +01:00
|
|
|
jobs:
|
|
|
|
- job: MacPackageSigningJob
|
|
|
|
displayName: macOS Package signing
|
|
|
|
dependsOn: build_macOS
|
|
|
|
condition: succeeded()
|
|
|
|
pool:
|
|
|
|
name: Package ES CodeHub Lab E
|
|
|
|
variables:
|
|
|
|
BuildConfiguration: release
|
|
|
|
BuildPlatform: any cpu
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
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:
|
|
|
|
downloadType: specific
|
|
|
|
itemPattern: |
|
|
|
|
**/*.tar.gz
|
|
|
|
**/*.pkg
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
dir "$(System.ArtifactsDirectory)\*" -Recurse
|
|
|
|
displayName: 'Capture Downloaded Artifacts'
|
|
|
|
# Diagnostics is not critical it passes every time it runs
|
|
|
|
continueOnError: true
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
$null = new-item -type directory -path "$(Build.StagingDirectory)\macos"
|
|
|
|
$zipFile = "$(Build.StagingDirectory)\macos\powershell-$(Version)-osx-x64.zip"
|
|
|
|
Compress-Archive -Path "$(System.ArtifactsDirectory)\results\powershell-$(Version)-osx-x64.pkg" -Destination $zipFile
|
|
|
|
Write-Host $zipFile
|
|
|
|
displayName: 'Compress macOS Package'
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
tools/releaseBuild/generatePackgeSigning.ps1 -MacDeveloperFiles "$(Build.StagingDirectory)\macos\powershell-$(Version)-osx-x64.zip" -path "$(System.ArtifactsDirectory)\package.xml"
|
|
|
|
displayName: 'Generate macOS Package Signing Xml'
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Get-Content "$(System.ArtifactsDirectory)\package.xml"
|
|
|
|
displayName: 'Capture macOS signing xml'
|
|
|
|
# Diagnostics is not critical it passes every time it runs
|
|
|
|
continueOnError: true
|
|
|
|
|
|
|
|
- task: PkgESCodeSign@10
|
|
|
|
displayName: 'CodeSign $(System.ArtifactsDirectory)\package.xml'
|
|
|
|
inputs:
|
|
|
|
signConfigXml: '$(System.ArtifactsDirectory)\package.xml'
|
|
|
|
outPathRoot: '$(Build.StagingDirectory)\signedMacOSPackages'
|
2019-02-26 00:06:01 +01:00
|
|
|
binVersion: $(SigingVersion)
|
|
|
|
binVersionOverride: $(SigningVersionOverride)
|
2019-02-12 18:24:11 +01:00
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))
|
2019-01-22 20:21:02 +01:00
|
|
|
|
2019-02-01 19:59:01 +01:00
|
|
|
- template: upload-final-results.yml
|
|
|
|
parameters:
|
2019-02-14 04:13:54 +01:00
|
|
|
artifactPath: $(System.ArtifactsDirectory)\results
|
2019-02-01 19:59:01 +01:00
|
|
|
artifactFilter: "*.tar.gz"
|
2019-01-22 20:21:02 +01:00
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
$destination = "$(System.ArtifactsDirectory)\azureMacOs"
|
|
|
|
New-Item -Path $destination -Type Directory
|
|
|
|
$zipPath = dir "$(Build.StagingDirectory)\signedMacOSPackages\powershell-*.zip" -Recurse | select-object -expandproperty fullname
|
|
|
|
Expand-Archive -Path $zipPath -DestinationPath $destination
|
|
|
|
$targzPath = dir "$(System.ArtifactsDirectory)\*.tar.gz" -Recurse | select-object -expandproperty fullname
|
|
|
|
Copy-Item -Path $targzPath -Destination $destination
|
2019-02-01 19:59:01 +01:00
|
|
|
displayName: 'Extract and copy macOS artifacts for upload'
|
2019-02-14 04:13:54 +01:00
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))
|
2019-02-01 19:59:01 +01:00
|
|
|
|
|
|
|
- template: upload-final-results.yml
|
|
|
|
parameters:
|
|
|
|
artifactPath: $(System.ArtifactsDirectory)\azureMacOs
|
|
|
|
artifactFilter: "*.pkg"
|
2019-02-14 04:13:54 +01:00
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))
|
|
|
|
|
2019-01-22 20:21:02 +01:00
|
|
|
|
|
|
|
- task: AzureFileCopy@1
|
|
|
|
displayName: 'AzureBlob File Copy'
|
|
|
|
inputs:
|
|
|
|
SourcePath: '$(System.ArtifactsDirectory)\azureMacOs'
|
|
|
|
azureSubscription: '$(AzureFileCopySubscription)'
|
|
|
|
Destination: AzureBlob
|
|
|
|
storage: '$(StorageAccount)'
|
|
|
|
ContainerName: '$(AzureVersion)'
|
2019-02-14 04:13:54 +01:00
|
|
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))
|
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'
|