2022-10-10 08:21:17 -04:00
|
|
|
#!/usr/bin/env bash
|
2022-08-10 04:13:18 -04:00
|
|
|
|
|
|
|
set -euo pipefail
|
2022-11-10 04:28:35 -05:00
|
|
|
shopt -s inherit_errexit
|
2022-08-10 04:13:18 -04:00
|
|
|
|
2022-11-10 08:17:04 -05:00
|
|
|
LATEST_AZURE_RUNS=$(
|
|
|
|
gh run list \
|
|
|
|
-R edgelesssys/constellation \
|
|
|
|
-w 'e2e Test Azure' \
|
|
|
|
--json databaseId \
|
|
|
|
-q '.[].databaseId'
|
|
|
|
)
|
2022-11-10 04:28:35 -05:00
|
|
|
echo "${LATEST_AZURE_RUNS}"
|
2022-11-10 08:17:04 -05:00
|
|
|
for RUN_ID in ${LATEST_AZURE_RUNS}; do
|
|
|
|
# Might fail, because no state was written, because e2e pipeline failed early
|
|
|
|
# Or, because state was downloaded by earlier run of this script
|
|
|
|
gh run download "${RUN_ID}" \
|
|
|
|
-R edgelesssys/constellation \
|
|
|
|
-n constellation-state.json \
|
|
|
|
-D azure/"${RUN_ID}" || true
|
2022-08-10 04:13:18 -04:00
|
|
|
done
|
|
|
|
|
2022-11-10 08:17:04 -05:00
|
|
|
LATEST_GCP_RUNS=$(
|
|
|
|
gh run list \
|
|
|
|
-R edgelesssys/constellation \
|
|
|
|
-w 'e2e Test GCP' \
|
|
|
|
--json databaseId \
|
|
|
|
-q '.[].databaseId'
|
|
|
|
)
|
2022-11-10 04:28:35 -05:00
|
|
|
echo "${LATEST_GCP_RUNS}"
|
2022-11-10 08:17:04 -05:00
|
|
|
for RUN_ID in ${LATEST_GCP_RUNS}; do
|
|
|
|
# Might fail, because no state was written, because e2e pipeline failed early
|
|
|
|
# Or, because state was downloaded by earlier run of this script
|
|
|
|
gh run download "${RUN_ID}" \
|
|
|
|
-R edgelesssys/constellation \
|
|
|
|
-n constellation-state.json \
|
|
|
|
-D gcp/"${RUN_ID}" || true
|
2022-08-10 04:13:18 -04:00
|
|
|
done
|