[chromedriver] Change json api endpoint

Choose a more reliable json file from the upstream to refer to.
"Stable" versions of Chrome and Chromedriver became unsynchronized for some reason.

Change-Id: I1688a867ea1987105e7a79c89ba7ea797819a12f
This commit is contained in:
astebenkova 2024-04-17 18:17:18 +03:00
parent 3168facfbd
commit efea7f5fd0

View File

@ -55,8 +55,8 @@
- name: Get selenium chromedriver archive
shell: |-
set -ex
CHROME_VERSION=$(dpkg -s google-chrome-stable | grep -Po '(?<=^Version: ).*' | awk -F'.' '{print $1"."$2"."$3}')
DRIVER_URL=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r --arg chrome_version "$CHROME_VERSION" '.channels.Stable.downloads.chromedriver[] | select(.platform=="linux64" and (.url | test($chrome_version))).url')
CHROME_VERSION=$(dpkg -s google-chrome-stable | sed -n 's/^Version: \(.*\)-.*$/\1/p')
DRIVER_URL=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json | jq -r --arg chrome_version "$CHROME_VERSION" '.versions[] | select(.version == $chrome_version) | .downloads.chromedriver[] | select(.platform=="linux64").url')
wget -O /tmp/chromedriver.zip ${DRIVER_URL}
args:
executable: /bin/bash