Skip to content

Commit

Permalink
fix(basic): skip cicd secret fetch if already done
Browse files Browse the repository at this point in the history
  • Loading branch information
keskiju committed Dec 12, 2024
1 parent 729a751 commit 89b1eb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/basic/hooks/pre-05
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ if [[ ${taito_mode:?} == "ci" ]] && \
/taito-cli-deps/tools/user-init.sh
fi

if [[ ${taito_command} == "db-deploy" ]] ||
[[ ${taito_command} == "test" ]]; then
if [[ ${basic_cicd_secrets_already_fetched} != "true" ]] && (
[[ ${taito_command} == "db-deploy" ]] ||
[[ ${taito_command} == "test" ]]
); then
# NOTE: taito_testing_secrets for backwards compatibility
cicd_secrets=("${taito_cicd_secrets} ${taito_testing_secrets}")
echo "Exporting ci/cd secrets: ${cicd_secrets}" > "${taito_vout:-}"
Expand All @@ -21,6 +23,8 @@ if [[ ${taito_command} == "db-deploy" ]] ||
taito -q -c ${taito_options:-} secret-export:$taito_env ${secret%:*}
)
done

export basic_cicd_secrets_already_fetched=true
fi

taito::call_next "${@}"

0 comments on commit 89b1eb9

Please sign in to comment.