mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-06 05:54:28 -04:00
cleaned up shell script to be more compliant with shellcheck
This commit is contained in:
parent
de2848e30c
commit
103d9f34b7
1 changed files with 10 additions and 3 deletions
|
@ -34,6 +34,7 @@ function delete_iam_config {
|
||||||
# check if the password for artifact decryption was given
|
# check if the password for artifact decryption was given
|
||||||
if [[ -z $ENCRYPTION_SECRET ]]; then
|
if [[ -z $ENCRYPTION_SECRET ]]; then
|
||||||
echo "ENCRYPTION_SECRET is not set. Please set an environment variable with that secret."
|
echo "ENCRYPTION_SECRET is not set. Please set an environment variable with that secret."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
artifact_pwd=$ENCRYPTION_SECRET
|
artifact_pwd=$ENCRYPTION_SECRET
|
||||||
|
@ -54,13 +55,19 @@ echo "[*] retrieving run IDs for cleanup"
|
||||||
database_ids=()
|
database_ids=()
|
||||||
for d in "${dates_to_clean[@]}"; do
|
for d in "${dates_to_clean[@]}"; do
|
||||||
echo " retrieving run IDs from $d"
|
echo " retrieving run IDs from $d"
|
||||||
database_ids+=($(get_e2e_test_ids_on_date "$d"))
|
mapfile -td " " tmp < <(get_e2e_test_ids_on_date "$d")
|
||||||
|
database_ids+="${tmp[@]}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# cleanup database_ids
|
||||||
|
mapfile -t database_ids <<<"$database_ids"
|
||||||
|
|
||||||
echo "[*] downloading terraform state artifacts"
|
echo "[*] downloading terraform state artifacts"
|
||||||
for id in "${database_ids[@]}"; do
|
for id in "${database_ids[@]}"; do
|
||||||
echo " downloading from workflow $id"
|
if [[ -n "$id" ]]; then
|
||||||
download_tfstate_artifact "$id"
|
echo " downloading from workflow $id"
|
||||||
|
download_tfstate_artifact "$id"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "[*] extracting artifacts"
|
echo "[*] extracting artifacts"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue