From 4ebca79f87bc8603e93d30fd4ab8c662d66d8aa5 Mon Sep 17 00:00:00 2001
From: Chase Qi <chase.qi@linaro.org>
Date: Tue, 28 Jun 2022 10:31:55 +0800
Subject: [PATCH] .oniro-ci: record callback respond in squad

When the callback not dispatchered correctly, the record can be helpful
for debugging in squad.

Signed-off-by: Chase Qi <chase.qi@linaro.org>
---
 .oniro-ci/test-generic.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.oniro-ci/test-generic.yaml b/.oniro-ci/test-generic.yaml
index 5e2dde3c..04f90815 100644
--- a/.oniro-ci/test-generic.yaml
+++ b/.oniro-ci/test-generic.yaml
@@ -77,7 +77,11 @@
       done
       # Attach a callback to this build to trigger the lava-report job
       squad_build_id="$(curl --silent "$CI_SQUAD_INSTANCE/api/builds/?version=$CI_PIPELINE_ID" | jq -r '.results[0].id')"
-      curl -X POST $CI_SQUAD_INSTANCE/api/builds/$squad_build_id/callbacks/ --header "Authorization: Token $CI_SQUAD_TOKEN" -F "callback_url=$CALLBACK_URL"
+      curl --silent \
+        -X POST "$CI_SQUAD_INSTANCE/api/builds/$squad_build_id/callbacks/" \
+        -H "Authorization: Token $CI_SQUAD_TOKEN" \
+        -F "callback_url=$CALLBACK_URL" \
+        -F "callback_record_response=true"
   artifacts:
     paths:
       - lava_jobs/*.yaml
-- 
GitLab