Skip to content

Commit ccfaa9c

Browse files
authored
fix(driverversion): Switching CFT driver endpoints (#1948)
[deploy]
1 parent 4f59eb6 commit ccfaa9c

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

NodeChrome/Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,10 @@ USER 1200
4040
ARG CHROME_DRIVER_VERSION
4141
RUN if [ ! -z "$CHROME_DRIVER_VERSION" ]; \
4242
then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chromedriver-linux64.zip ; \
43-
else echo "Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" \
44-
&& CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json \
45-
&& CFT_CHANNEL="Stable" \
46-
&& if [ "$CHROME_VERSION" = "google-chrome-beta" ]; then CFT_CHANNEL="Beta" ; fi \
47-
&& if [ "$CHROME_VERSION" = "google-chrome-unstable" ]; then CFT_CHANNEL="Dev" ; fi \
48-
&& echo $CFT_CHANNEL \
49-
&& CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL "$CFT_CHANNEL" '.channels[] | select (.channel==$CFT_CHANNEL)') \
50-
&& CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' ) \
51-
&& CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform=="linux64") | .url' ) ; \
43+
else echo "Geting ChromeDriver latest version from https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_" \
44+
&& CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\.[0-9]+){3}.*/\1/") \
45+
&& CHROME_DRIVER_VERSION=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | sed 's/\r$//') \
46+
&& CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chromedriver-linux64.zip ; \
5247
fi \
5348
&& echo "Using ChromeDriver from: "$CHROME_DRIVER_URL \
5449
&& echo "Using ChromeDriver version: "$CHROME_DRIVER_VERSION \

0 commit comments

Comments
 (0)