PowerShell/tools/releaseBuild/azureDevOps/templates/upload.yml
Travis Plunk e96b0bf85b
Refactor Unified Release Build (#8804)
Refactor Unified Release Build
  - Make injecting the nuget.config a template
  - Make setting the version variable a template
  - Add parameters to templates where needed
  - Run defender scan before uploading linux packages (and rename step to plain english)
2019-01-31 15:10:19 -08:00

42 lines
1.8 KiB
YAML

parameters:
architecture: x86
version: 6.2.0
msi: yes
steps:
- powershell: |
$packagePath = "$(Build.StagingDirectory)\signedPackages\PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.msi"
if(Test-Path -Path $packagePath)
{
Write-Host "##vso[artifact.upload containerfolder=signedResults;artifactname=signedResults]$packagePath"
}
displayName: '[create script] upload signed msi - ${{ parameters.architecture }}'
condition: and(succeeded(), eq('${{ parameters.msi }}', 'yes'))
- task: AzureFileCopy@1
displayName: 'upload signed msi to Azure - ${{ parameters.architecture }}'
inputs:
SourcePath: '$(Build.StagingDirectory)\signedPackages\PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.msi'
azureSubscription: '$(AzureFileCopySubscription)'
Destination: AzureBlob
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'
condition: and(succeeded(), eq('${{ parameters.msi }}', 'yes'))
- powershell: |
$packagePath = "$(System.ArtifactsDirectory)\signed\PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.zip"
if(Test-Path -Path $packagePath)
{
Write-Host "##vso[artifact.upload containerfolder=signedResults;artifactname=signedResults]$packagePath"
}
displayName: '[create script] upload signed zip - ${{ parameters.architecture }}'
- task: AzureFileCopy@1
displayName: 'upload signed zip to Azure - ${{ parameters.architecture }}'
inputs:
SourcePath: '$(System.ArtifactsDirectory)\signed\PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.zip'
azureSubscription: '$(AzureFileCopySubscription)'
Destination: AzureBlob
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'