@@ -13,14 +13,15 @@ jobs:
13
13
14
14
steps :
15
15
- task : UseDotNet@2
16
- condition : ne('${{ parameters.dotnetVersion }}', '')
17
16
displayName : Install desired .NET version ${{ parameters.dotnetVersion }}
17
+ condition : ne('${{ parameters.dotnetVersion }}', '')
18
18
inputs :
19
19
packageType : sdk
20
20
version : ${{ parameters.dotnetVersion }}
21
21
22
22
- task : PowerShell@2
23
23
displayName : Install desired Powershell version ${{ parameters.psVersion }}
24
+ condition : ne('${{ parameters.psVersion }}', '')
24
25
inputs :
25
26
pwsh : true
26
27
targetType : filePath
@@ -29,14 +30,15 @@ jobs:
29
30
30
31
- task : PowerShell@2
31
32
displayName : Create live test data location directory
33
+ condition : ne(variables['skipLatest'], 'true')
32
34
inputs :
33
35
pwsh : true
34
36
targetType : inline
35
37
script :
36
38
New-Item -Name $(ArtifactsName) -Path $(Pipeline.Workspace) -ItemType Directory -Force
37
39
38
40
- task : DownloadPipelineArtifact@2
39
- condition : and(succeeded(), eq(variables['GalleryName'], 'DailyBuild'), eq(variables['PipelineBuildId'], ''))
41
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), eq(variables['GalleryName'], 'DailyBuild'), eq(variables['PipelineBuildId'], ''))
40
42
displayName : Download latest artifacts from daily build pipeline main branch
41
43
inputs :
42
44
buildType : ' specific'
48
50
targetPath : $(Pipeline.Workspace)
49
51
50
52
- task : DownloadPipelineArtifact@2
51
- condition : and(succeeded(), eq(variables['GalleryName'], 'DailyBuild'), ne(variables['PipelineBuildId'], ''))
53
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), eq(variables['GalleryName'], 'DailyBuild'), ne(variables['PipelineBuildId'], ''))
52
54
displayName : Download specific artifacts from daily build pipeline
53
55
inputs :
54
56
buildType : ' specific'
60
62
targetPath : $(Pipeline.Workspace)
61
63
62
64
- task : DownloadPipelineArtifact@2
63
- condition : and(succeeded(), eq(variables['GalleryName'], 'Sign'), eq(variables['PipelineBuildId'], ''))
65
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), eq(variables['GalleryName'], 'Sign'), eq(variables['PipelineBuildId'], ''))
64
66
displayName : Download latest artifacts from sign pipeline internal/release branch
65
67
inputs :
66
68
buildType : ' specific'
72
74
targetPath : $(Pipeline.Workspace)
73
75
74
76
- task : DownloadPipelineArtifact@2
75
- condition : and(succeeded(), eq(variables['GalleryName'], 'Sign'), ne(variables['PipelineBuildId'], ''))
77
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), eq(variables['GalleryName'], 'Sign'), ne(variables['PipelineBuildId'], ''))
76
78
displayName : Download specific artifacts from sign pipeline
77
79
inputs :
78
80
buildType : ' specific'
84
86
targetPath : $(Pipeline.Workspace)
85
87
86
88
- task : PowerShell@2
87
- condition : and(succeeded(), ne(variables['GalleryName'], 'PSGallery'))
89
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), ne(variables[' GalleryName'], 'PSGallery'))
88
90
displayName : Copy artifacts to local repository
89
91
inputs :
90
92
pwsh : true
97
99
98
100
- task : PowerShell@2
99
101
displayName : Install desired Az module from $(GalleryName)
102
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
100
103
inputs :
101
104
pwsh : true
102
105
targetType : filePath
@@ -105,6 +108,7 @@ jobs:
105
108
106
109
- task : PowerShell@2
107
110
displayName : Connect Azure with live test service principal
111
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
108
112
inputs :
109
113
pwsh : true
110
114
targetType : filePath
@@ -114,28 +118,26 @@ jobs:
114
118
retryCountOnTaskFailure : 3
115
119
116
120
- task : PowerShell@2
117
- displayName : Run top E2E live scenarios
121
+ displayName : Run end-to-end live scenarios
122
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
118
123
inputs :
119
124
pwsh : true
120
125
targetType : filePath
121
126
filePath : ./tools/TestFx/Live/InvokeLiveTestCITask.ps1
122
- arguments : -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/InvokeLiveTestScenarios.ps1 -RunPlatform ${{ parameters.osType }} -RunPowerShell ${{ parameters.psVersion }} -PowerShellLatest $(PowerShellLatest) -RepoLocation $(Build.SourcesDirectory) -DataLocation $(DataLocation)'
123
- retryCountOnTaskFailure : 3
127
+ arguments : -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/InvokeLiveTestScenarios.ps1 -OSVersion ${{ parameters.vmImage }} -RunPlatform ${{ parameters.osType }} -RunPowerShell ${{ parameters.psVersion }}'
124
128
125
129
- task : PowerShell@2
126
130
displayName : Save live test results to Kusto
127
- condition : and(succeededOrFailed (), eq(variables['Build.Reason'], 'Schedule'))
131
+ condition : and(succeeded (), ne(variables['skipLatest'], 'true'), or( eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.SourceBranch'], 'refs/heads/internal/release') ))
128
132
inputs :
129
133
pwsh : true
130
134
targetType : filePath
131
135
filePath : ./tools/TestFx/Live/SaveLiveTestResult.ps1
132
- arguments : $(KustoServicePrincipalTenantId) $(KustoServicePrincipalId) $(KustoServicePrincipalSecret) $(KustoClusterName) $(KustoClusterRegion) $(LiveTestDatabaseName) $(LiveTestTableName) $(DataLocation) $(Build.BuildId) ${{ parameters.vmImage }} "$(Tag)"
133
- failOnStderr : true
134
- retryCountOnTaskFailure : 3
136
+ arguments : $(KustoServicePrincipalTenantId) $(KustoServicePrincipalId) $(KustoServicePrincipalSecret) $(KustoClusterName) $(KustoClusterRegion)
135
137
136
138
- task : PublishPipelineArtifact@1
137
139
displayName : Publish live test results to pipeline artifact
140
+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
138
141
inputs :
139
142
artifact : livetest-os-${{ parameters.vmImage }}-ps-${{ replace(parameters.psVersion, '*', 'x') }}
140
143
targetPath : $(DataLocation)
141
- condition : always()
0 commit comments