From efea7f5fd00ecca56b3cf1b3f93a7fea97cd2865 Mon Sep 17 00:00:00 2001 From: astebenkova Date: Wed, 17 Apr 2024 18:17:18 +0300 Subject: [PATCH] [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 --- roles/deploy-selenium/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/deploy-selenium/tasks/main.yaml b/roles/deploy-selenium/tasks/main.yaml index fa4140725..fe19e0f97 100644 --- a/roles/deploy-selenium/tasks/main.yaml +++ b/roles/deploy-selenium/tasks/main.yaml @@ -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