Skip to content

Commit

Permalink
Add branch and deploy location (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljurek authored Aug 10, 2022
1 parent 49854e5 commit a75b04f
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions eng/pipelines/template-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,30 @@ jobs:
}
displayName: Ensure $(AzdVersion) is set
- pwsh: |
if (!$env:TEMPLATEBRANCHNAME) {
Write-Host "TemplateBranchName variable not set. Using 'staging'"
Write-Host "##vso[task.setvariable variable=TemplateBranchName]staging"
} else {
Write-Host "Using specified azd version: $(TemplateBranchName)"
}
displayName: Ensure $(TemplateBranchName) is set
- pwsh: |
if (!$env:DEPLOYLOCATION) {
Write-Host "DeployLocation variable not set. Using 'eastus'"
Write-Host "##vso[task.setvariable variable=DeployLocation]eastus"
} else {
Write-Host "Using specified azd version: $(DeployLocation)"
}
displayName: Ensure $(DeployLocation) is set
- bash: curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --version '$(AzdVersion)' --verbose
displayName: Install azd

- pwsh: |
$templateName = '$(TemplateName)'.Substring(14)
$resourceGroupName = "azd-template-test-$templateName-$(Build.BuildId)"
$resourceGroupName = "azd-template-test-$templateName-$(Build.BuildId)-rg"
Write-Host "Resource group name: $resourceGroupName"
Write-Host "##vso[task.setvariable variable=ResourceGroupName]$resourceGroupName"
Expand All @@ -73,8 +91,9 @@ jobs:
arguments: >
-e 'azd-template-test'
-t '$(TemplateName)'
-b '$(TemplateBranchName)'
-s '$(Build.BuildId)'
-l 'centralus'
-l '$(DeployLocation)'
-p 'list'
workingDirectory: templates/tests
displayName: Test templates
Expand Down

0 comments on commit a75b04f

Please sign in to comment.