Skip to content
Merged
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
9 changes: 7 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,11 @@ workflows:
parameters:
test-target: [
test-factory-electron,
test-factory-firefox,
test-factory-cypress-included-electron,
test-factory-cypress-included-electron-non-root-user,
test-factory-cypress-included-firefox,
test-factory-cypress-included-firefox-non-root-user,
test-factory-all-included-electron-only
]
resourceClass: [arm.medium]
Expand Down Expand Up @@ -317,7 +320,8 @@ workflows:
alias: browsers-arm
parameters:
test-target: [
test-browsers-electron
test-browsers-electron,
test-browsers-firefox
]
resourceClass: [arm.medium]
target: [browsers]
Expand All @@ -338,7 +342,8 @@ workflows:
alias: included-arm
parameters:
test-target: [
test-included-electron
test-included-electron,
test-included-firefox
]
resourceClass: [arm.medium]
target: [included]
Expand Down
2 changes: 1 addition & 1 deletion factory/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NODE_VERSION="${FACTORY_DEFAULT_NODE_VERSION}"

# Update the FACTORY_VERSION to deploy cypress/factory if you make changes to
# BASE_IMAGE, FACTORY_DEFAULT_NODE_VERSION, YARN_VERSION, factory.Dockerfile or installScripts
FACTORY_VERSION='5.4.0'
FACTORY_VERSION='5.5.0'

# Chrome versions: https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
CHROME_VERSION='134.0.6998.88-1'
Expand Down
4 changes: 4 additions & 0 deletions factory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 5.5.0

- Add factory support for Firefox `arm64` with versions `136.0` and above. Addresses [#1306](https://github.com/cypress-io/cypress-docker-images/issues/1306).

## 5.4.0

- Add support for HTTP_PROXY when building a `cypress/factory` based image. Addressed in [#1276](https://github.com/cypress-io/cypress-docker-images/pull/1276).
Expand Down
7 changes: 6 additions & 1 deletion factory/installScripts/firefox/default.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#! /bin/bash

# Firefox does not have a debian package that is kept up to date, so instead we install deps directly and download the tar to unzip.
#
# $1: version (example: 136.0)
# $2: compression (xz or bz2)
# $3: platform (linux-x86_64 or linux-aarch64)

apt-get update \
&& apt-get install -y \
libxtst6 \
libgtk-3-0 \
libdbus-glib-1-2 \
mplayer \
xz-utils \
&& wget --no-verbose -O /tmp/firefox.tar.${2} https://download-installer.cdn.mozilla.net/pub/firefox/releases/${1}/linux-x86_64/en-US/firefox-${1}.tar.${2} \
&& wget --no-verbose -O /tmp/firefox.tar.${2} https://download-installer.cdn.mozilla.net/pub/firefox/releases/${1}/${3}/en-US/firefox-${1}.tar.${2} \
&& tar -C /opt -xaf /tmp/firefox.tar.${2} \
&& rm /tmp/firefox.tar.${2} \
&& ln -fs /opt/firefox/firefox /usr/bin/firefox \
28 changes: 22 additions & 6 deletions factory/installScripts/firefox/install-firefox-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,29 @@ if (!firefoxVersion) {
return
}

if (process.arch !== 'x64') {
console.log('Not downloading Firefox since we are not on x64. For arm64 status see https://bugzilla.mozilla.org/show_bug.cgi?id=1678342')
return
const architecture = process.arch
let platform

switch (architecture) {
case 'x64':
platform = 'linux-x86_64'
break
case 'arm64':
platform = 'linux-aarch64'
if (firefoxVersion >= '136.0') {
break
}
else {
console.log(`Firefox ${firefoxVersion} not available for arm64, minimum 136.0 required, skipping download`)
return
}
default:
console.log(`Unsupported architecture ${architecture} for Firefox, skipping download`)
return
}

console.log(`Installing Firefox version ${firefoxVersion} for ${architecture}`)

// Change in compression from bz2 to xz in Firefox 135.0
// See https://www.mozilla.org/en-US/firefox/135.0/releasenotes/

Expand All @@ -22,10 +40,8 @@ if (firefoxVersion >= '135.0') {
compression = `xz`
}

console.log('Installing Firefox version: ', firefoxVersion)

// Insert logic here if needed to run a different install script based on chrome version.
const install = spawn(`${__dirname}/default.sh`, [firefoxVersion, compression], {stdio: 'inherit'})
const install = spawn(`${__dirname}/default.sh`, [firefoxVersion, compression, platform], { stdio: 'inherit' })

install.on('error', function (error) {
console.log('child process errored with ' + error.toString())
Expand Down