From 1b33913d54efcd78623e2df6298d4cab05a2c48e Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Sep 2024 15:50:27 +0200 Subject: [PATCH] [FIX] Install Chrome fixed version to avoid sudden errors Odoo's approach with Runbots is to install a fixed version of Chrome and only when a new version is tested across all the supported code base they bump it. That way, they avoid sudden errors that would make the whole CIs collapse on tour tests. We can follow the guideline of Odoo's fixed versions for a minimum guarantee. --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9bfa0ad..c48b626 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,8 +48,13 @@ RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq postgresql-client-12 -# Install Google Chrome for browser tests -RUN curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \ +# Install Google Chrome for browser tests with values {"chrome_version": "126.0.6478.182-1"} +# Fixed following Odoo's Runbot guideline https://github.com/odoo/runbot/commit/f18a1adfc387321dac907735e8c3a77a15b2607f +RUN case $(lsb_release -c -s) in \ + focal) CHROME_DEB_URL=https://snapshot.debian.org/archive/debian-security/20240117T233842Z/pool/updates/main/c/chromium/chromium_120.0.6099.224-1~deb11u1_amd64.deb ;; \ + jammy) CHROME_DEB_URL=https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_123.0.6312.58-1_amd64.deb ;; \ + esac \ + && curl -sSL $CHROME_DEB_URL -o /tmp/chrome.deb \ && apt-get -y install --no-install-recommends /tmp/chrome.deb \ && rm /tmp/chrome.deb