Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: collect host os name and version (#4244)

Andrey Lushnikov86e1e3f3fed7
diff --git a/utils/upload_flakiness_dashboard.sh b/utils/upload_flakiness_dashboard.sh
index 088fa43cb8..123160c5c1 100755
--- a/utils/upload_flakiness_dashboard.sh
+++ b/utils/upload_flakiness_dashboard.sh
@@ -44,10 +44,22 @@ export BUILD_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_
export COMMIT_SHA=$(git rev-parse HEAD)
export COMMIT_TIMESTAMP=$(git show -s --format=%ct HEAD)
+export HOST_OS_NAME="$(uname)"
+export HOST_OS_VERSION=""
+if [[ "$HOST_OS_NAME" == "Darwin" ]]; then
+ HOST_OS_VERSION=$(sw_vers -productVersion | grep -o '^\d\+.\d\+')
+elif [[ "$HOST_OS_NAME" == "Linux" ]]; then
+ HOST_OS_NAME="$(bash -c 'source /etc/os-release && echo $NAME')"
+ HOST_OS_VERSION="$(bash -c 'source /etc/os-release && echo $VERSION_ID')"
+fi
+
+
EMBED_METADATA_SCRIPT=$(cat <<EOF
const json = require('./' + process.argv[1]);
json.metadata = {
runURL: process.env.BUILD_URL,
+ osName: process.env.HOST_OS_NAME,
+ osVersion: process.env.HOST_OS_VERSION,
commitSHA: process.env.COMMIT_SHA,
commitTimestamp: process.env.COMMIT_TIMESTAMP,
};