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

[Ubuntu] Add Microsoft Edge #5849

Closed
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function Get-SeleniumVersion {
return "Selenium server $fullSeleniumVersion"
}

function Get-EdgeVersion {
AlexanderGitin marked this conversation as resolved.
Show resolved Hide resolved
$edgeVersion = microsoft-edge --version
return $edgeVersion
}

function Build-BrowserWebdriversEnvironmentTable {
return @(
@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ $browsersAndDriversList = @(
(Get-ChromeVersion),
(Get-ChromeDriverVersion),
(Get-ChromiumVersion),
(Get-SeleniumVersion)
(Get-SeleniumVersion),
(Get-EdgeVersion)
)

if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
Expand Down
19 changes: 19 additions & 0 deletions images/linux/scripts/installers/edge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e
################################################################################
## File: edge.sh
## Desc: Installs Edge
################################################################################

# Import Microsoft Edge GPG Key and Repository
wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /usr/share/keyrings/microsoft-edge.gpg

# Import the Microsoft Edge Repo
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' > /etc/apt/sources.list.d/microsoft-edge.list
miketimofeev marked this conversation as resolved.
Show resolved Hide resolved

apt-get update

apt-get install microsoft-edge-stable

rm -f /etc/apt/sources.list.d/microsoft-edge.list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i'll do it


invoke_tests "Browsers" "Edge"
6 changes: 6 additions & 0 deletions images/linux/scripts/tests/Browsers.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ Describe "Chromium" {
"chromium-browser --version" | Should -ReturnZeroExitCode
}
}

Describe "Edge" {
It "Edge" {
"microsoft-edge --version" | Should -ReturnZeroExitCode
}
}
1 change: 1 addition & 0 deletions images/linux/ubuntu1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
"{{template_dir}}/scripts/installers/git.sh",
"{{template_dir}}/scripts/installers/github-cli.sh",
"{{template_dir}}/scripts/installers/google-chrome.sh",
"{{template_dir}}/scripts/installers/edge.sh",
"{{template_dir}}/scripts/installers/google-cloud-sdk.sh",
"{{template_dir}}/scripts/installers/haskell.sh",
"{{template_dir}}/scripts/installers/heroku.sh",
Expand Down
1 change: 1 addition & 0 deletions images/linux/ubuntu2004.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
"{{template_dir}}/scripts/installers/erlang.sh",
"{{template_dir}}/scripts/installers/firefox.sh",
"{{template_dir}}/scripts/installers/edge.sh",
AlexanderGitin marked this conversation as resolved.
Show resolved Hide resolved
"{{template_dir}}/scripts/installers/gcc.sh",
"{{template_dir}}/scripts/installers/gfortran.sh",
"{{template_dir}}/scripts/installers/git.sh",
Expand Down
1 change: 1 addition & 0 deletions images/linux/ubuntu2204.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ build {
"${path.root}/scripts/installers/git.sh",
"${path.root}/scripts/installers/github-cli.sh",
"${path.root}/scripts/installers/google-chrome.sh",
"${path.root}/scripts/installers/edge.sh",
"${path.root}/scripts/installers/google-cloud-sdk.sh",
"${path.root}/scripts/installers/haskell.sh",
"${path.root}/scripts/installers/heroku.sh",
Expand Down