Skip to content

Commit a14c163

Browse files
authored
Add uploading support for the android apk-automation and boottime tests (#498)
* android: apk-automation: add support for uploading archives to SQUAD via specifying the SQUAD_UPLOAD_URL variable. To be noted, to avoid leak of tokens, the SQUAD_ARCHIVE_SUBMIT_TOKEN used for uploading authentication is not supported to be defined in the job definition in the plain text format, it must be defined as one profile managed token of the submitter Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> * android: boottime: add support for uploading archives to SQUAD via specifying the SQUAD_UPLOAD_URL variable. To be noted, to avoid leak of tokens, the SQUAD_ARCHIVE_SUBMIT_TOKEN used for uploading authentication is not supported to be defined in the job definition in the plain text format, it must be defined as one profile managed token of the submitter Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> --------- Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 parent 178f445 commit a14c163

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

automated/android/apk-automation/apk-automation.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ params:
3232
# 'secrets' dictionary, and set job visibility to personal or group.
3333
# Refer to https://validation.linaro.org/static/docs/v2/publishing-artifacts.html
3434
ARTIFACTORIAL_TOKEN: ""
35+
# The SQUAD url to be used to upload the result and log files.
36+
# see https://squad.readthedocs.io/en/latest/intro.html#submitting-results.
37+
# SQUAD_ARCHIVE_SUBMIT_TOKEN is used for uploading authentication,
38+
# and must be defined by the submitter as one profile managed token
39+
SQUAD_UPLOAD_URL: ""
3540

3641
run:
3742
steps:
@@ -40,6 +45,7 @@ run:
4045
# Upload test output to artifactorial.
4146
- cp "./output/${TEST_NAME}/result.txt" "./output/result.txt"
4247
- tar caf "output-${TEST_NAME}.tar.xz" "./output"
43-
- ../../utils/upload-to-artifactorial.sh -a "output-${TEST_NAME}.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"
48+
- if [ -n "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-squad.sh -a "output-${TEST_NAME}.tar.xz" -u "${SQUAD_UPLOAD_URL}"; fi
49+
- if [ -z "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-artifactorial.sh -a "output-${TEST_NAME}.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"; fi
4450
# Send test result to LAVA.
4551
- ../../utils/send-to-lava.sh "./output/result.txt"

automated/android/boottime/boottime.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,17 @@ params:
3333
# Specify url and token for file uploading.
3434
URL: "https://archive.validation.linaro.org/artifacts/team/qa/"
3535
TOKEN: ""
36+
# The SQUAD url to be used to upload the result and log files.
37+
# see https://squad.readthedocs.io/en/latest/intro.html#submitting-results.
38+
# SQUAD_ARCHIVE_SUBMIT_TOKEN is used for uploading authentication,
39+
# and must be defined by the submitter as one profile managed token
40+
SQUAD_UPLOAD_URL: ""
3641

3742
run:
3843
steps:
3944
- cd ./automated/android/boottime
4045
- ./boottime.sh -S "${SKIP_INSTALL}" -t "${BOOT_TIMEOUT}" -o "${OPERATION}" -n "${COLLECT_NO}" -v "${ANDROID_VERSION}"
41-
- if [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-artifactorial.sh -a "output/boottime.tgz" -u "${URL}" -t "${TOKEN}"; fi
46+
- if [ -n "${SQUAD_UPLOAD_URL}" ] && [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-squad.sh -a "output/boottime.tgz" -u "${SQUAD_UPLOAD_URL}"; fi
47+
- if [ -z "${SQUAD_UPLOAD_URL}" ] && [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-artifactorial.sh -a "output/boottime.tgz" -u "${URL}" -t "${TOKEN}"; fi
4248
- ../../utils/send-to-lava.sh ./output/boot_result.txt
4349
- ../../utils/send-to-lava.sh ./output/result.txt

0 commit comments

Comments
 (0)