2020-08-14 01:09:50 +02:00
|
|
|
jobs:
|
|
|
|
- job: UpdateDepsFiles
|
|
|
|
displayName: Update deps files
|
|
|
|
pool:
|
|
|
|
vmImage: windows-latest
|
|
|
|
variables:
|
|
|
|
- group: 'Azure Blob variable group'
|
|
|
|
steps:
|
|
|
|
- download: releasePipeline
|
|
|
|
artifact: finalResults
|
|
|
|
patterns: '**/PowerShell*-win-x64.zip'
|
|
|
|
|
|
|
|
- download: releasePipeline
|
|
|
|
artifact: BuildInfoJson
|
|
|
|
|
|
|
|
- pwsh: |
|
|
|
|
$fileName = (Get-Item "$ENV:PIPELINE_WORKSPACE/releasePipeline/BuildInfoJson/*.json").BaseName
|
|
|
|
if ($fileName -notin 'stable','preview')
|
|
|
|
{
|
|
|
|
throw "Unexpected fileName: $fileName"
|
|
|
|
}
|
|
|
|
|
2020-08-19 00:47:56 +02:00
|
|
|
$vstsCommand = "vso[task.setvariable variable=BlobPrefix]$fileName"
|
|
|
|
Write-Verbose -Verbose $vstsCommand
|
2020-08-14 01:09:50 +02:00
|
|
|
Write-Host "##$vstsCommand"
|
|
|
|
displayName: Determine container name
|
|
|
|
|
|
|
|
- pwsh: |
|
2020-08-19 00:47:56 +02:00
|
|
|
$zipFile = (Get-Item "$ENV:PIPELINE_WORKSPACE/releasePipeline/finalResults/PowerShell*-win-x64.zip")
|
2020-08-14 01:09:50 +02:00
|
|
|
Expand-Archive -Path $zipFile -Destination "$ENV:PIPELINE_WORKSPACE/expanded"
|
|
|
|
|
|
|
|
$pwshDepsFile = Get-Item "$ENV:PIPELINE_WORKSPACE/expanded/pwsh.deps.json"
|
|
|
|
$vstsCommand = "vso[task.setvariable variable=FileToUpload]$pwshDepsFile"
|
2020-08-19 00:47:56 +02:00
|
|
|
Write-Verbose -Verbose $vstsCommand
|
2020-08-14 01:09:50 +02:00
|
|
|
Write-Host "##$vstsCommand"
|
|
|
|
displayName: Determine file to upload
|
|
|
|
|
|
|
|
- task: AzureFileCopy@2
|
|
|
|
displayName: 'AzureBlob pwsh.deps.json file Copy'
|
|
|
|
inputs:
|
|
|
|
SourcePath: '$(FileToUpload)'
|
|
|
|
azureSubscription: '$(AzureFileCopySubscription)'
|
|
|
|
Destination: AzureBlob
|
|
|
|
storage: '$(StorageAccount)'
|
|
|
|
ContainerName: ps-deps-json
|
2020-08-19 00:47:56 +02:00
|
|
|
blobPrefix: '$(BlobPrefix)'
|