diff options
author | liuyq <yongqin.liu@linaro.org> | 2024-02-28 18:15:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 10:15:58 +0000 |
commit | a14c1633b22acb33ae3149c88ea644e7a724424b (patch) | |
tree | 815edb42f26176f0753eacc5829df1ae78d063cd | |
parent | 178f4459c5182ad28a654271776fd764c662af0e (diff) |
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>
-rw-r--r-- | automated/android/apk-automation/apk-automation.yaml | 8 | ||||
-rw-r--r-- | automated/android/boottime/boottime.yaml | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/automated/android/apk-automation/apk-automation.yaml b/automated/android/apk-automation/apk-automation.yaml index 805e8eb3..5b6881b5 100644 --- a/automated/android/apk-automation/apk-automation.yaml +++ b/automated/android/apk-automation/apk-automation.yaml @@ -32,6 +32,11 @@ params: # 'secrets' dictionary, and set job visibility to personal or group. # Refer to https://validation.linaro.org/static/docs/v2/publishing-artifacts.html ARTIFACTORIAL_TOKEN: "" + # The SQUAD url to be used to upload the result and log files. + # see https://squad.readthedocs.io/en/latest/intro.html#submitting-results. + # SQUAD_ARCHIVE_SUBMIT_TOKEN is used for uploading authentication, + # and must be defined by the submitter as one profile managed token + SQUAD_UPLOAD_URL: "" run: steps: @@ -40,6 +45,7 @@ run: # Upload test output to artifactorial. - cp "./output/${TEST_NAME}/result.txt" "./output/result.txt" - tar caf "output-${TEST_NAME}.tar.xz" "./output" - - ../../utils/upload-to-artifactorial.sh -a "output-${TEST_NAME}.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}" + - if [ -n "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-squad.sh -a "output-${TEST_NAME}.tar.xz" -u "${SQUAD_UPLOAD_URL}"; fi + - if [ -z "${SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-artifactorial.sh -a "output-${TEST_NAME}.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"; fi # Send test result to LAVA. - ../../utils/send-to-lava.sh "./output/result.txt" diff --git a/automated/android/boottime/boottime.yaml b/automated/android/boottime/boottime.yaml index 378dca4f..981f20be 100644 --- a/automated/android/boottime/boottime.yaml +++ b/automated/android/boottime/boottime.yaml @@ -33,11 +33,17 @@ params: # Specify url and token for file uploading. URL: "https://archive.validation.linaro.org/artifacts/team/qa/" TOKEN: "" + # The SQUAD url to be used to upload the result and log files. + # see https://squad.readthedocs.io/en/latest/intro.html#submitting-results. + # SQUAD_ARCHIVE_SUBMIT_TOKEN is used for uploading authentication, + # and must be defined by the submitter as one profile managed token + SQUAD_UPLOAD_URL: "" run: steps: - cd ./automated/android/boottime - ./boottime.sh -S "${SKIP_INSTALL}" -t "${BOOT_TIMEOUT}" -o "${OPERATION}" -n "${COLLECT_NO}" -v "${ANDROID_VERSION}" - - if [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-artifactorial.sh -a "output/boottime.tgz" -u "${URL}" -t "${TOKEN}"; fi + - if [ -n "${SQUAD_UPLOAD_URL}" ] && [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-squad.sh -a "output/boottime.tgz" -u "${SQUAD_UPLOAD_URL}"; fi + - if [ -z "${SQUAD_UPLOAD_URL}" ] && [ "${OPERATION}" = "ANALYZE" ]; then ../../utils/upload-to-artifactorial.sh -a "output/boottime.tgz" -u "${URL}" -t "${TOKEN}"; fi - ../../utils/send-to-lava.sh ./output/boot_result.txt - ../../utils/send-to-lava.sh ./output/result.txt |