Skip to content

Commit f5bb40b

Browse files
committed
noninteractive-tradefed: add support for uploading archives to SQUAD
via specifying the SQUAD_UPLOAD_URL variables. To be noted, to avoid leak of tokens, the SQUAD_ARCHIVE_SUBMIT_TOKEN used to upload is not supported to be defined in the job definition in the plain text format, it's must be defined as one profile managed token by the submitter Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 parent 9e686e7 commit f5bb40b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

automated/android/noninteractive-tradefed/tradefed.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ params:
2525
TEST_PATH: "android-cts"
2626
# Specify result format: aggregated or atomic
2727
RESULTS_FORMAT: "aggregated"
28+
# The SQUAD url to be used to upload the result and log files.
29+
# see https://squad.readthedocs.io/en/latest/intro.html#submitting-results.
30+
# SQUAD_ARCHIVE_SUBMIT_TOKEN is used for uploading authentication,
31+
# and must be defined by the submitter as one profile managed token
32+
SQUAD_UPLOAD_URL: ""
2833
# Specify url and token for file uploading.
2934
URL: "https://archive.validation.linaro.org/artifacts/team/qa/"
3035
TOKEN: ""
@@ -65,7 +70,8 @@ run:
6570
- sudo dmesg > ./output/dmesg-host.txt || true
6671
- if ! tar caf tradefed-output-$(date +%Y%m%d%H%M%S).tar.xz ./output; then error_fatal "tradefed - failed to collect results and log files [$ANDROID_SERIAL]"; fi
6772
- ATTACHMENT=$(ls tradefed-output-*.tar.xz)
68-
- ../../utils/upload-to-artifactorial.sh -a "${ATTACHMENT}" -u "${URL}" -t "${TOKEN}"
73+
- if [ -n "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-squad.sh -a "${ATTACHMENT}" -u "${SQUAD_UPLOAD_URL}"; fi
74+
- if [ -z "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-artifactorial.sh -a "${ATTACHMENT}" -u "${URL}" -t "${TOKEN}"; fi
6975
# Send test result to LAVA.
7076
- ../../utils/send-to-lava.sh ./output/result.txt
7177
- userdel testuser -f -r || true

0 commit comments

Comments
 (0)