From 538640ca2a8b25633a5d2b7437042a53bc6ce177 Mon Sep 17 00:00:00 2001 From: Andy Mishechkin <57713077+andy-mishechkin@users.noreply.github.com> Date: Wed, 20 Jan 2021 03:46:42 -0800 Subject: [PATCH] Chromium browser has been added to Ubuntu 20 (#2463) * deploy script for chromium-browser has been created * Chromium-browser.sh has been added to packer template * Chromium has been added to software report * Chromium-browser installation has been moved to toolset * Bug - chromium-browser.sh has been removed from ubuntu2004.json * Browsers documentation has been fixed --- .../scripts/SoftwareReport/SoftwareReport.Browsers.psm1 | 5 +++++ .../scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 8 +++++++- images/linux/scripts/tests/Browsers.Tests.ps1 | 6 ++++++ images/linux/toolsets/toolset-2004.json | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 index d65eb5536..9fa03583f 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 @@ -16,4 +16,9 @@ function Get-FirefoxVersion { function Get-GeckodriverVersion { $geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-OutputPart -Part 1 return "Geckodriver $geckodriverVersion" +} + +function Get-ChromiumVersion { + $chromiumVersion = chromium --version | Take-OutputPart -Part 0,1 + return $chromiumVersion } \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 5259a88f7..b686122d2 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -200,12 +200,18 @@ $markdown += New-MDList -Style Unordered -Lines (@( ) $markdown += New-MDHeader "Browsers and Drivers" -Level 3 -$markdown += New-MDList -Style Unordered -Lines @( + +$browsersAndDriversList = @( (Get-ChromeVersion), (Get-ChromeDriverVersion), (Get-FirefoxVersion), (Get-GeckodriverVersion) ) +if (Test-IsUbuntu20) { + $browsersAndDriversList = @(Get-ChromiumVersion) + $browsersAndDriversList +} + +$markdown += New-MDList -Style Unordered -Lines $browsersAndDriversList $markdown += New-MDHeader ".NET Core SDK" -Level 3 $markdown += New-MDList -Style Unordered -Lines @( diff --git a/images/linux/scripts/tests/Browsers.Tests.ps1 b/images/linux/scripts/tests/Browsers.Tests.ps1 index b96e1c2ae..1efd16343 100644 --- a/images/linux/scripts/tests/Browsers.Tests.ps1 +++ b/images/linux/scripts/tests/Browsers.Tests.ps1 @@ -16,4 +16,10 @@ Describe "Chrome" { It "Chrome Driver" { "chromedriver --version" | Should -ReturnZeroExitCode } +} + +Describe "Chromium" -Skip:(-not (Test-IsUbuntu20)) { + It "Chromium" { + "chromium --version" | Should -ReturnZeroExitCode + } } \ No newline at end of file diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index ba5fcf47a..fe27c40b9 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -106,6 +106,7 @@ "apt": { "common_packages": [ "build-essential", + "chromium-browser", "dbus", "dnsutils", "dpkg",