4
4
# and additional variables specified by template-test-generate-jobs.yml
5
5
6
6
steps :
7
- - template : /eng/pipelines/templates/steps/az-login.yml
8
-
9
7
- template : /eng/pipelines/templates/steps/install-azd-live-sh.yml
10
8
parameters :
11
9
Version : $(AzdVersion)
12
10
11
+ - template : /eng/pipelines/templates/steps/azd-login.yml
12
+
13
13
# Java pre-requisites that isn't met
14
14
# TODO: Use azd container as a form of validation that the container works
15
15
- template : /eng/pipelines/templates/steps/install-ms-openjdk.yml
@@ -30,6 +30,12 @@ steps:
30
30
Write-Host "##vso[task.setvariable variable=ResourceGroupName]$resourceGroupName"
31
31
Write-Host "##vso[task.setvariable variable=EnvPrefixName]$envPrefixName"
32
32
33
+ $SynchronousCleanup = 'true'
34
+ if ('$(Build.Reason)' -eq 'PullRequest') {
35
+ $SynchronousCleanup = 'false'
36
+ }
37
+ Write-Host "##vso[task.setvariable variable=SynchronousCleanup]$SynchronousCleanup"
38
+
33
39
$CleanupImmediate = 'true'
34
40
if ($(CleanupHoursDelay) -ne '0') {
35
41
$CleanupImmediate = 'false'
@@ -48,16 +54,19 @@ steps:
48
54
targetType : filePath
49
55
filePath : templates/tests/test-templates.sh
50
56
arguments : >
57
+ -f '$(Pipeline.Workspace)'
51
58
-e '$(EnvPrefixName)'
52
59
-t '$(TemplateName)'
53
60
-b '$(TemplateBranchName)'
54
61
-s '$(SubscriptionId)'
55
62
-u '$(Build.BuildId)'
56
63
-l '$(AzureLocation)'
57
64
-p 'list'
58
- -c '$(CleanupImmediate )'
65
+ -c '$(SynchronousCleanup )'
59
66
workingDirectory : templates/tests
60
67
68
+ - template : /eng/pipelines/templates/steps/az-login.yml
69
+
61
70
# First tag the resource group (if exists) so that it can get cleaned up
62
71
# by the cleanup pipeline. Then attempt to delete the resource group
63
72
# directly. If the delete fails the cleanup pipeline will delete it.
0 commit comments