Skip to content

Commit fa63195

Browse files
Use latest chrome and chromium
Signed-off-by: Evgeniy Dikevich <evgeny.dikevich@innowise.com>
1 parent 6ff6570 commit fa63195

File tree

2 files changed

+52
-36
lines changed

2 files changed

+52
-36
lines changed

earthly/debian/Earthfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,13 @@ common:
3535
apt-utils \
3636
git \
3737
curl \
38-
gzip \
3938
unzip \
4039
bzip2 \
41-
bash \
4240
jq \
4341
gpg \
4442
lcov \
45-
tar \
4643
wget \
4744
build-essential \
48-
gcc \
4945
xz-utils
5046
DO +INSTALL --packages=$PACKAGES
5147

earthly/flutter/installer/Earthfile

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,51 @@ INSTALL_CHROME_LINUX64:
2626
# You must provide it as ARG, e.g., `ARG TARGETARCH` in your function to use it.
2727
# Read more about it here: https://docs.earthly.dev/docs/earthfile/builtin-args#platform-related-args
2828
IF [ "$TARGETARCH" = "amd64" ]
29+
# RUN printf "${BLUE} Installing Google Chrome..." \
30+
# && curl -sSL -o /opt/chrome.zip "${BASE_URL}/chrome/chrome_amd64.zip" \
31+
# && unzip /opt/chrome.zip -d /opt/chrome \
32+
# && dpkg -i /opt/chrome/chrome_amd64/google-chrome-stable_current_amd64.deb || true \
33+
# && dpkg -i /opt/chrome/chrome_amd64/*.deb || true \
34+
# && echo "Check and fix missing dependencies..." \
35+
# && apt-get update --fix-missing \
36+
# && apt-get install -f -y \
37+
# && rm -rf /opt/chrome.zip /opt/chrome
38+
# RUN google-chrome --version
39+
# DO +PATCH_CHROME --BIN_TO_PATCH="google-chrome"
40+
41+
# RUN printf "${BLUE} Installing Chromedriver..." \
42+
# && mkdir -p /opt/chromedriver \
43+
# && curl -L "${BASE_URL}/chrome/chromedriver-linux64.zip" \
44+
# -o /opt/chromedriver/chromedriver.zip \
45+
# && unzip -j /opt/chromedriver/chromedriver.zip -d /usr/local/bin/
46+
# RUN chromedriver --version
47+
2948
RUN printf "${BLUE} Installing Google Chrome..." \
30-
&& curl -sSL -o /opt/chrome.zip "${BASE_URL}/chrome/chrome_amd64.zip" \
31-
&& unzip /opt/chrome.zip -d /opt/chrome \
32-
&& dpkg -i /opt/chrome/chrome_amd64/google-chrome-stable_current_amd64.deb || true \
33-
&& dpkg -i /opt/chrome/chrome_amd64/*.deb || true \
49+
&& curl -sSL -o /opt/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
50+
&& dpkg -i /opt/chrome.deb || true \
3451
&& echo "Check and fix missing dependencies..." \
3552
&& apt-get update --fix-missing \
36-
&& apt-get install -f -y \
37-
&& rm -rf /opt/chrome.zip /opt/chrome
53+
&& apt-get install -f -y \
54+
&& rm -rf /opt/chrome.deb
3855
RUN google-chrome --version
3956
DO +PATCH_CHROME --BIN_TO_PATCH="google-chrome"
4057

4158
RUN printf "${BLUE} Installing Chromedriver..." \
4259
&& mkdir -p /opt/chromedriver \
43-
&& curl -L "${BASE_URL}/chrome/chromedriver-linux64.zip" \
60+
&& CHROME_VERSION=$(google-chrome --version | cut -d' ' -f3) \
61+
&& curl -L "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" \
4462
-o /opt/chromedriver/chromedriver.zip \
4563
&& unzip -j /opt/chromedriver/chromedriver.zip -d /usr/local/bin/
4664
RUN chromedriver --version
4765

4866
ELSE
49-
DO +INSTALL_CHROMIUM --PACKAGE_TYPE="chromium" --DOWNLOAD_URL="${BASE_URL}/chrome/chromium.zip"
67+
# DO +INSTALL_CHROMIUM --PACKAGE_TYPE="chromium" --DOWNLOAD_URL="${BASE_URL}/chrome/chromium.zip"
68+
RUN apt-get update --fix-missing \
69+
&& apt-get install -y chromium chromium-driver
5070
RUN chromium --version
5171
DO +PATCH_CHROME --BIN_TO_PATCH="chromium"
5272

53-
DO +INSTALL_CHROMIUM --PACKAGE_TYPE="chromium-driver" --DOWNLOAD_URL="${BASE_URL}/chrome/chromium-driver.zip"
73+
# DO +INSTALL_CHROMIUM --PACKAGE_TYPE="chromium-driver" --DOWNLOAD_URL="${BASE_URL}/chrome/chromium-driver.zip"
5474
RUN chromedriver --version
5575
END
5676

@@ -120,29 +140,29 @@ INSTALL_EDGE_LINUX64:
120140
END
121141

122142
# Installs the Chromium or Chromium driver.
123-
INSTALL_CHROMIUM:
124-
FUNCTION
125-
126-
ARG --required PACKAGE_TYPE
127-
ARG --required DOWNLOAD_URL
128-
LET BLUE='\033[0;34m'
129-
130-
RUN printf "${BLUE} Installing the latest ${PACKAGE_TYPE} version...\n" \
131-
&& echo "Downloading ${PACKAGE_TYPE} and dependencies from: ${DOWNLOAD_URL}" \
132-
&& curl -sSL -o /opt/${PACKAGE_TYPE}.zip ${DOWNLOAD_URL} \
133-
&& echo "Downloaded file information:" \
134-
&& ls -lh /opt/${PACKAGE_TYPE}.zip \
135-
&& echo "Unzipping ${PACKAGE_TYPE} packages..." \
136-
&& unzip /opt/${PACKAGE_TYPE}.zip -d /opt/${PACKAGE_TYPE} \
137-
&& echo "Contents of /opt/${PACKAGE_TYPE} after unzipping:" \
138-
&& ls -lh /opt/${PACKAGE_TYPE}/${PACKAGE_TYPE} \
139-
&& echo "Installing ${PACKAGE_TYPE} and dependencies..." \
140-
&& dpkg -i /opt/${PACKAGE_TYPE}/${PACKAGE_TYPE}/*.deb || true \
141-
&& echo "Checking for missing dependencies..." \
142-
&& echo "Cleaning up..." \
143-
&& rm /opt/${PACKAGE_TYPE}.zip \
144-
&& rm -r /opt/${PACKAGE_TYPE} \
145-
&& echo "${PACKAGE_TYPE} installation completed."
143+
# INSTALL_CHROMIUM:
144+
# FUNCTION
145+
146+
# ARG --required PACKAGE_TYPE
147+
# ARG --required DOWNLOAD_URL
148+
# LET BLUE='\033[0;34m'
149+
150+
# RUN printf "${BLUE} Installing the latest ${PACKAGE_TYPE} version...\n" \
151+
# && echo "Downloading ${PACKAGE_TYPE} and dependencies from: ${DOWNLOAD_URL}" \
152+
# && curl -sSL -o /opt/${PACKAGE_TYPE}.zip ${DOWNLOAD_URL} \
153+
# && echo "Downloaded file information:" \
154+
# && ls -lh /opt/${PACKAGE_TYPE}.zip \
155+
# && echo "Unzipping ${PACKAGE_TYPE} packages..." \
156+
# && unzip /opt/${PACKAGE_TYPE}.zip -d /opt/${PACKAGE_TYPE} \
157+
# && echo "Contents of /opt/${PACKAGE_TYPE} after unzipping:" \
158+
# && ls -lh /opt/${PACKAGE_TYPE}/${PACKAGE_TYPE} \
159+
# && echo "Installing ${PACKAGE_TYPE} and dependencies..." \
160+
# && dpkg -i /opt/${PACKAGE_TYPE}/${PACKAGE_TYPE}/*.deb || true \
161+
# && echo "Checking for missing dependencies..." \
162+
# && echo "Cleaning up..." \
163+
# && rm /opt/${PACKAGE_TYPE}.zip \
164+
# && rm -r /opt/${PACKAGE_TYPE} \
165+
# && echo "${PACKAGE_TYPE} installation completed."
146166

147167
PATCH_CHROME:
148168
FUNCTION

0 commit comments

Comments
 (0)