Fix build notification error & ignore other errors

This commit is contained in:
Max Radermacher
2024-04-17 19:07:41 -05:00
committed by GitHub
parent 869e7ff2c6
commit 71c82a607c
3 changed files with 6 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
set -eux
./send_build_notification.py started
./send_build_notification.py started || :
cd ..
make dependencies

View File

@@ -3,7 +3,7 @@
set -eux
if [ "${CI_XCODEBUILD_EXIT_CODE:-0}" = 0 ]; then
./send_build_notification.py finished
./send_build_notification.py finished || :
else
./send_build_notification.py failed
./send_build_notification.py failed || :
fi

View File

@@ -50,16 +50,16 @@ def main(ns):
source = env["NOTIFY_SOURCE"]
destination = env["NOTIFY_DESTINATION"]
branch = env["CI_BRANCH"]
build_number = env["CI_BUILD_NUMBER"]
build_url = env["CI_BUILD_URL"]
prefix = EVENT_PREFIXES[ns.event]
ref = env["CI_GIT_REF"]
trigger = env["CI_START_CONDITION"]
version = get_marketing_version()
message = (
f"{prefix} {workflow} for {version} ({build_number}) {ns.event} "
f"from {branch} (trigger: {trigger})\n\n{build_url}"
f"{prefix} Cloud build for {version} ({build_number}) {ns.event} "
f"from {ref} (trigger: {trigger})\n\n{build_url}"
)
args = ["curl", "--silent"]
args.extend(["-H", "Content-Type: application/json"])