From 94b880c4dc6d32e4db404eb97c31382d8a7ed34b Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 21 Nov 2019 06:42:47 +0400 Subject: [PATCH] Upload verify artifacts on failure --- .gitlab-ci.yml | 6 ++++-- buildbox/verify-telegram.sh | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf32c59567..d89926d6ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,8 +66,9 @@ verifysanity_beta_testflight: environment: name: testflight_llc artifacts: + when: on_failure paths: - - build/artifacts + - build/verifysanity_artifacts expire_in: 1 week verify_beta_testflight: @@ -83,6 +84,7 @@ verify_beta_testflight: environment: name: testflight_llc artifacts: + when: on_failure paths: - - build/artifacts + - build/verify_artifacts expire_in: 1 week diff --git a/buildbox/verify-telegram.sh b/buildbox/verify-telegram.sh index 38da0b6949..371382f6be 100644 --- a/buildbox/verify-telegram.sh +++ b/buildbox/verify-telegram.sh @@ -13,8 +13,10 @@ fi if [ "$MODE" == "cached" ]; then BUCK_HTTP_CACHE="$BUCK_HTTP_CACHE" + ERROR_OUTPUT_PATH="build/verifysanity_artifacts" elif [ "$MODE" == "full" ]; then BUCK_HTTP_CACHE="" + ERROR_OUTPUT_PATH="build/verify_artifacts" else echo "Unknown mode $MODE" exit 1 @@ -41,6 +43,11 @@ mv "$IPA_PATH" "$VERIFY_PATH" BUCK_HTTP_CACHE="$BUCK_HTTP_CACHE" sh buildbox/build-telegram.sh verify python3 tools/ipadiff.py "$IPA_PATH" "$VERIFY_PATH" +retVal=$? +if [ $retVal -ne 0 ]; then + mkdir -p "$ERROR_OUTPUT_PATH" + cp "$IPA_PATH" "$ERROR_OUTPUT_PATH"/ + exit 1 +fi + -# No need to upload artifacts if the output matches previous step -rm -rf "$OUTPUT_PATH"