[CI] Update base test-generation pipeline to use AzureCLI task (#9745)

This commit is contained in:
Erik Bershel
2024-04-25 12:21:49 +02:00
committed by GitHub
parent c98eeb230d
commit e63a194563

View File

@@ -59,13 +59,13 @@ jobs:
arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) ` arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) `
-RepoBranch $(CUSTOM_REPOSITORY_BRANCH) -RepoBranch $(CUSTOM_REPOSITORY_BRANCH)
- task: AzurePowerShell@5 - task: AzureCLI@2
displayName: 'Set variables' displayName: 'Set variables'
inputs: inputs:
TargetAzurePs: LatestVersion
azureSubscription: 'spn-hosted-runners' azureSubscription: 'spn-hosted-runners'
ScriptType: 'InlineScript' scriptType: 'pscore'
Inline: | scriptLocation: 'inlineScript'
inlineScript: |
$ImageType = "${{ parameters.image_type }}" $ImageType = "${{ parameters.image_type }}"
$TemplateDirectoryName = if ($ImageType.StartsWith("ubuntu")) { "ubuntu/templates" } else { "windows/templates" } $TemplateDirectoryName = if ($ImageType.StartsWith("ubuntu")) { "ubuntu/templates" } else { "windows/templates" }
$TemplateDirectoryPath = Join-Path "images" $TemplateDirectoryName | Resolve-Path $TemplateDirectoryPath = Join-Path "images" $TemplateDirectoryName | Resolve-Path