-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathux-portal.yml
45 lines (44 loc) · 1.71 KB
/
ux-portal.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Multi-job configuration must be converted to matrix strategy: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#multi-job-configuration
parameters:
- name: AzurePowerShellVersion
displayName: Azure PowerShell Version(like 9.0.0)
type: string
- name: IsLatestVersion
displayName: IsLatestVersion
type: boolean
default: true
jobs:
- job: Job_1
displayName: "Sync latest UX metadata files to Storage Blob"
timeoutInMinutes: 90
pool: pool-windows-2019
steps:
- checkout: self
- task: PowerShell@2
displayName: Compress the UX metadata files
inputs:
targetType: inline
script: >-
.\CompressUXMetadata.ps1
workingDirectory: tools
- task: AzurePowerShell@5
displayName: Upload to Storage Blob
inputs:
azureSubscription: 'azureps-infra-sp'
ScriptType: InlineScript
workingDirectory: artifacts
Inline: |
$context = New-AzStorageContext -StorageAccountName "$(StorageAccountName)"
If ("${{ parameters.IsLatestVersion }}" -eq "True")
{
Copy-Item "UX.zip" -Destination "azps-latest.zip"
Set-AzStorageBlobContent -Container $(StorageBlobContainerName) -Context $context -File "azps-latest.zip" -Blob "$(StorageBlobFolder)/azps-latest.zip" -Force
}
$zipFile = "${{ parameters.AzurePowerShellVersion }}.zip"
Move-Item "UX.zip" -Destination $zipFile
Set-AzStorageBlobContent -Container $(StorageBlobContainerName) -Context $context -File $zipFile -Blob "$(StorageBlobFolder)/$zipFile" -Force
azurePowerShellVersion: LatestVersion
pwsh: true
- template: util/publish-artifacts-steps.yml
parameters:
artifactName: ux-portal