Skip to content

Commit 856e4d3

Browse files
committed
Updated artifacts name for daily build and set trigger to none
1 parent 358a6bb commit 856e4d3

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

.azure-pipelines/live-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ schedules:
5454
- shared/livetest
5555

5656
pr: none
57+
trigger: none
5758

5859
jobs:
5960
- template: util/live-test-steps.yml

.azure-pipelines/util/live-test-steps.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,23 @@ jobs:
3737
condition: and(succeeded(), eq(variables['GalleryName'], 'DailyBuild'), eq(variables['BuildPipelineBuildId'], ''))
3838
displayName: Download latest artifacts from daily build pipeline main branch
3939
inputs:
40-
buildType: specific
40+
buildType: 'specific'
4141
project: $(ProjectToDownloadArtifacts)
4242
definition: $(BuildPipelineDefinitionId)
43-
buildVersionToDownload: latestFromBranch
44-
branchName: refs/heads/master
45-
artifactName: $(ArtifactName)
43+
buildVersionToDownload: 'latest'
44+
artifactName: 'artifacts'
4645
targetPath: $(Pipeline.Workspace)
4746

4847
- task: DownloadPipelineArtifact@2
4948
condition: and(succeeded(), eq(variables['GalleryName'], 'DailyBuild'), ne(variables['BuildPipelineBuildId'], ''))
5049
displayName: Download specific artifacts from daily build pipeline
5150
inputs:
52-
buildType: specific
51+
buildType: 'specific'
5352
project: $(ProjectToDownloadArtifacts)
5453
definition: $(BuildPipelineDefinitionId)
55-
buildVersionToDownload: specific
54+
buildVersionToDownload: 'specific'
5655
pipelineId: $(BuildPipelineBuildId)
57-
artifactName: $(ArtifactName)
56+
artifactName: 'artifacts'
5857
targetPath: $(Pipeline.Workspace)
5958

6059
- task: PowerShell@2
@@ -75,7 +74,7 @@ jobs:
7574
pwsh: true
7675
targetType: filePath
7776
filePath: ./tools/TestFx/Live/InvokeLiveTestCITask.ps1
78-
arguments: -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/InstallLiveTestAzModules.ps1 -Source $(GalleryName) -AzPackagesLocation (Convert-Path -LiteralPath $(DataLocation) | Join-Path -ChildPath AzPackages)'
77+
arguments: -UseWindowsPowerShell ('${{ parameters.psVersion }}' -eq '5.1') -ScriptFile './tools/TestFx/Live/InstallLiveTestAzModules.ps1 -Source $(GalleryName) -AzPackagesLocation (Join-Path -Path $(DataLocation) -ChildPath AzPackages)'
7978

8079
- task: PowerShell@2
8180
displayName: Connect Azure with live test service principal

tools/TestFx/Live/InvokeLiveTestCITask.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else {
2121

2222
switch ($PSCmdlet.ParameterSetName) {
2323
"ByScriptFile" {
24-
Invoke-Expression "$process -NoLogo -NoProfile -NonInteractive -File '$ScriptFile'"
24+
Invoke-Expression "$process -NoLogo -NoProfile -NonInteractive -File $ScriptFile"
2525
}
2626
"ByScriptBlock" {
2727
Invoke-Expression "$process -NoLogo -NoProfile -NonInteractive -Command $ScriptBlock"

tools/TestFx/Live/InvokeLiveTestScenarios.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ process {
107107
$OSVersion = "LocalDebug"
108108
$PSVersion = "LocalDebug"
109109
}
110+
else {
111+
$BuildId = $PSBoundParameters["BuildId"]
112+
$OSVersion = $PSBoundParameters["OSVersion"]
113+
$PSVersion = $PSBoundParameters["PSVersion"]
114+
}
110115

111116
$srcDir = Join-Path -Path $RepoLocation -ChildPath "src"
112117
$liveScenarios = Get-ChildItem -LiteralPath $srcDir -Recurse -Directory -Filter "LiveTests" | Get-ChildItem -Filter "TestLiveScenarios.ps1" -File

tools/TestFx/Live/LiveTestUtility.psm1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ param (
3333
[string] $DataLocation
3434
)
3535

36-
$ErrorActionPreference = "Stop"
37-
3836
New-Variable -Name ResourceGroupPrefix -Value "azpsliverg" -Scope Script -Option Constant
3937
New-Variable -Name ResourcePrefix -Value "azpslive" -Scope Script -Option Constant
4038
New-Variable -Name StorageAccountPrefix -Value "azpslivesa" -Scope Script -Option Constant
@@ -148,7 +146,7 @@ function Invoke-LiveTestCommand {
148146
Write-Host "##[section]Start to execute the command '$Command'" -ForegroundColor Green
149147
Write-Host "##[command]The command '$Command' is running" -ForegroundColor Cyan
150148

151-
$cmdResult = Invoke-Expression -Command $Command
149+
$cmdResult = Invoke-Expression -Command $Command -ErrorAction Stop
152150

153151
Write-Host "##[section]Successfully executed the command '$Command'" -ForegroundColor Green
154152
$cmdResult
@@ -233,7 +231,7 @@ function Invoke-LiveTestScenario {
233231

234232
do {
235233
try {
236-
Invoke-Command -ScriptBlock $ScenarioScript -ArgumentList $snrResourceGroup
234+
Invoke-Command -ScriptBlock $ScenarioScript -ArgumentList $snrResourceGroup -ErrorAction Stop
237235
Write-Host "##[section]Successfully executed the live scenario '$Name'." -ForegroundColor Green
238236
break
239237
}

0 commit comments

Comments
 (0)