@@ -13,14 +13,15 @@ jobs:
1313
1414 steps :
1515 - task : UseDotNet@2
16- condition : ne('${{ parameters.dotnetVersion }}', '')
1716 displayName : Install desired .NET version ${{ parameters.dotnetVersion }}
17+ condition : ne('${{ parameters.dotnetVersion }}', '')
1818 inputs :
1919 packageType : sdk
2020 version : ${{ parameters.dotnetVersion }}
2121
2222 - task : PowerShell@2
2323 displayName : Install desired Powershell version ${{ parameters.psVersion }}
24+ condition : ne('${{ parameters.psVersion }}', '')
2425 inputs :
2526 pwsh : true
2627 targetType : filePath
@@ -29,14 +30,15 @@ jobs:
2930
3031 - task : PowerShell@2
3132 displayName : Create live test data location directory
33+ condition : ne(variables['skipLatest'], 'true')
3234 inputs :
3335 pwsh : true
3436 targetType : inline
3537 script :
3638 New-Item -Name $(ArtifactsName) -Path $(Pipeline.Workspace) -ItemType Directory -Force
3739
3840 - 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'], ''))
4042 displayName : Download latest artifacts from daily build pipeline main branch
4143 inputs :
4244 buildType : ' specific'
4850 targetPath : $(Pipeline.Workspace)
4951
5052 - 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'], ''))
5254 displayName : Download specific artifacts from daily build pipeline
5355 inputs :
5456 buildType : ' specific'
6062 targetPath : $(Pipeline.Workspace)
6163
6264 - 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'], ''))
6466 displayName : Download latest artifacts from sign pipeline internal/release branch
6567 inputs :
6668 buildType : ' specific'
7274 targetPath : $(Pipeline.Workspace)
7375
7476 - 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'], ''))
7678 displayName : Download specific artifacts from sign pipeline
7779 inputs :
7880 buildType : ' specific'
8486 targetPath : $(Pipeline.Workspace)
8587
8688 - task : PowerShell@2
87- condition : and(succeeded(), ne(variables['GalleryName'], 'PSGallery'))
89+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'), ne(variables[' GalleryName'], 'PSGallery'))
8890 displayName : Copy artifacts to local repository
8991 inputs :
9092 pwsh : true
9799
98100 - task : PowerShell@2
99101 displayName : Install desired Az module from $(GalleryName)
102+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
100103 inputs :
101104 pwsh : true
102105 targetType : filePath
@@ -105,37 +108,36 @@ jobs:
105108
106109 - task : PowerShell@2
107110 displayName : Connect Azure with live test service principal
111+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
108112 inputs :
109113 pwsh : true
110114 targetType : filePath
111115 filePath : ./tools/TestFx/Live/InvokeLiveTestCITask.ps1
112- arguments : -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/ConnectLiveTestServicePrincipal.ps1 $(LiveTestServicePrincipalSubscriptionId ) $(LiveTestServicePrincipalTenantId ) $(LiveTestServicePrincipalId) $(LiveTestServicePrincipalSecret)'
116+ arguments : -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/ConnectLiveTestServicePrincipal.ps1 $(LiveTestSubscriptionId ) $(LiveTestTenantId ) $(LiveTestServicePrincipalId) $(LiveTestServicePrincipalSecret)'
113117 failOnStderr : true
114118 retryCountOnTaskFailure : 3
115119
116120 - 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'))
118123 inputs :
119124 pwsh : true
120125 targetType : filePath
121126 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 }}'
124128
125129 - task : PowerShell@2
126130 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') ))
128132 inputs :
129133 pwsh : true
130134 targetType : filePath
131135 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 : $(KustoTenantId) $(KustoServicePrincipalId) $(KustoServicePrincipalSecret) $(KustoClusterName) $(KustoClusterRegion)
135137
136138 - task : PublishPipelineArtifact@1
137139 displayName : Publish live test results to pipeline artifact
140+ condition : and(succeeded(), ne(variables['skipLatest'], 'true'))
138141 inputs :
139142 artifact : livetest-os-${{ parameters.vmImage }}-ps-${{ replace(parameters.psVersion, '*', 'x') }}
140143 targetPath : $(DataLocation)
141- condition : always()
0 commit comments