Skip to content

Commit b825983

Browse files
committed
devops: disable previews on telegram bot messages
1 parent e0d3e48 commit b825983

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

browser_patches/buildbots/send_telegram_message.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ send_telegram_message() {
99
curl --silent \
1010
-X POST \
1111
-H 'Content-Type: application/json' \
12-
-d '{"chat_id": "-1001225613794", "parse_mode": "html", "text": "'"$TEXT"'", "disable_notification": false}' \
12+
-d '{"disable_web_page_preview": true, "chat_id": "-1001225613794", "parse_mode": "html", "text": "'"$TEXT"'", "disable_notification": false}' \
1313
https://api.telegram.org/bot$TELEGRAM_BOT_KEY/sendMessage >/dev/null
1414
}

browser_patches/checkout_build_archive_upload.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ trap "rm -rf ${ZIP_PATH}; rm -rf ${LOG_PATH}; cd $(pwd -P);" INT TERM EXIT
117117
cd "$(dirname "$0")"
118118
BUILD_NUMBER=$(cat ./$BROWSER_NAME/BUILD_NUMBER)
119119
BUILD_BLOB_PATH="${BROWSER_NAME}/${BUILD_NUMBER}/${BUILD_BLOB_NAME}"
120-
LOG_BLOB_PATH="${BROWSER_NAME}/${BUILD_NUMBER}/${BUILD_BLOB_NAME%.zip}.log.gz"
120+
LOG_BLOB_NAME="${BUILD_BLOB_NAME%.zip}.log.gz"
121+
LOG_BLOB_PATH="${BROWSER_NAME}/${BUILD_NUMBER}/${LOG_BLOB_NAME}"
121122

122123
# pull from upstream and check if a new build has to be uploaded.
123124
if ! [[ ($2 == '-f') || ($2 == '--force') ]]; then
@@ -213,6 +214,6 @@ else
213214
fi
214215
# Upload logs only in case of failure and report failure.
215216
./upload.sh ${LOG_BLOB_PATH} ${LOG_PATH} || true
216-
send_telegram_message "$BUILD_ALIAS -- ${FAILED_STEP} failed! ❌ <a href='https://playwright.azureedge.net/builds/${LOG_BLOB_PATH}'>see logs</a>"
217+
send_telegram_message "$BUILD_ALIAS -- ${FAILED_STEP} failed! ❌ <a href='https://playwright.azureedge.net/builds/${LOG_BLOB_PATH}'>${LOG_BLOB_NAME}</a>"
217218
fi
218219

0 commit comments

Comments
 (0)