Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve 'Get second latest chromedriver' logging #4373

Merged
merged 4 commits into from
Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions testing/browser-functional/browser-tests-build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ steps:
inputs:
targetType: inline
script: |
$packageName = "chromedriver";
Write-Host "Get $packageName second latest version from npmjs.com";
$versions = npm view $packageName versions | ConvertFrom-Json;
$versionToUse = $versions[-2];
Write-Host "$packageName second latest = $versionToUse";
" "

if ($null -ne $Env:ChromeDriverVersionOverride -and $Env:ChromeDriverVersionOverride.Trim() -ne '') {
Write-Host "Pipeline var ChromeDriverVersionOverride is set.";
$secondLatestVersion = $Env:ChromeDriverVersionOverride;
Write-Host "Use override value = $secondLatestVersion";
$versionToUse = $Env:ChromeDriverVersionOverride;
Write-Host "Use override value = $versionToUse";
} else {
Write-Host "Pipeline var ChromeDriverVersionOverride is not set.";
$packageName = "chromedriver";

Write-Host "Get $packageName second latest version from npmjs.com";
" "
$versions = npm view $packageName versions | ConvertFrom-Json;

$secondLatestVersion = $versions[-2];
Write-Host "$packageName second latest = $secondLatestVersion";
Write-Host "Use value = $versionToUse";
}

"##vso[task.setvariable variable=DriverVersion;]$secondLatestVersion";
displayName: 'Get second latest chromedriver version number from npmjs.com'
"##vso[task.setvariable variable=DriverVersion;]$versionToUse";
displayName: 'Get chromedriver version number to use'

- task: PowerShell@2
inputs:
Expand All @@ -76,7 +76,7 @@ steps:
$content -Replace "$find", "$replace" | Set-Content $_.FullName;
'-------------'; get-content $_.FullName; '==================='
}
displayName: 'Upgrade chromedriver reference to second latest version'
displayName: 'Upgrade chromedriver version reference'

- task: NodeTool@0
displayName: use node 16.x
Expand Down