mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
fix shellscript issues
fixed shellcheck issues fixed shellcheck issues again
This commit is contained in:
parent
ea6374b054
commit
d624af222a
@ -1,5 +1,3 @@
|
||||
#!/bin/env bash
|
||||
|
||||
# get_e2e_test_ids_on_date gets all workflow IDs of workflows that contain "e2e" on a specific date.
|
||||
function get_e2e_test_ids_on_date {
|
||||
ids="$(gh run list --created "$1" --status failure --json createdAt,workflowName,databaseId --jq '.[] | select(.workflowName | contains("e2e") and (contains("MiniConstellation") | not)) | .databaseId' -L1000 -R edgelesssys/constellation || exit 1)"
|
||||
@ -56,15 +54,16 @@ database_ids=()
|
||||
for d in "${dates_to_clean[@]}"; do
|
||||
echo " retrieving run IDs from $d"
|
||||
mapfile -td " " tmp < <(get_e2e_test_ids_on_date "$d")
|
||||
database_ids+="${tmp[@]}"
|
||||
database_ids+=("${tmp[*]}")
|
||||
done
|
||||
|
||||
# cleanup database_ids
|
||||
mapfile -t database_ids <<< "$database_ids"
|
||||
mapfile -t database_ids < <(echo "${database_ids[@]}")
|
||||
mapfile -td " " database_ids < <(echo "${database_ids[@]}")
|
||||
|
||||
echo "[*] downloading terraform state artifacts"
|
||||
for id in "${database_ids[@]}"; do
|
||||
if [[ -n $id ]]; then
|
||||
if [[ "$id" = *[^[:space:]]* ]]; then
|
||||
echo " downloading from workflow $id"
|
||||
download_tfstate_artifact "$id"
|
||||
fi
|
||||
|
2
.github/workflows/e2e-test.yml
vendored
2
.github/workflows/e2e-test.yml
vendored
@ -284,7 +284,7 @@ jobs:
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform]; then
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
|
Loading…
x
Reference in New Issue
Block a user