Skip to content

Commit

Permalink
if using env, do not look at mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterOdin committed Oct 3, 2023
1 parent e88850e commit 7fd3e54
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

if [ -n "${DBT_PROFILES}" ]; then
echo "${DBT_PROFILES}" > /.dbt/profiles.yml
elif [ -f ~/.dbt/profiles.yml ]; then
cp ~/.dbt/profiles.yml /.dbt/profiles.yml
fi

if [ -n "${AWS_CREDENTIALS}" ]; then
echo "${AWS_CREDENTIALS}" > /.dbt/aws_credentials
elif [ -f ~/.aws/credentials ]; then
cp ~/.aws/credentials /.dbt/aws_credentials
fi

if [ -n "${BQ_KEYFILE}" ]; then
echo "${BQ_KEYFILE}" > /.dbt/bq_keyfile.json
if [ -n "${AWS_CREDENTIALS}" ]; then
echo "${AWS_CREDENTIALS}" > /.dbt/aws_credentials
fi
if [ -n "${BQ_KEYFILE}" ]; then
echo "${BQ_KEYFILE}" > /.dbt/bq_keyfile.json
fi
else
if [ -f ~/.dbt/profiles.yml ]; then
cp ~/.dbt/profiles.yml /.dbt/profiles.yml
fi
if [ -f ~/.aws/credentials ]; then
cp ~/.aws/credentials /.dbt/aws_credentials
fi
fi

exec "$@"

0 comments on commit 7fd3e54

Please sign in to comment.