Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow to setup private dbt repository #592

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
# flexibility for forking, running branches, specific versions, etc.
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
("DBT_BRANCH", "v3.4.1"),
("DBT_SSH_KEY", ""),
# Path to the dbt project inside the repository
("DBT_REPOSITORY_PATH", "aspects-dbt"),
# This is a pip compliant list of Python packages to install to run dbt
Expand Down
9 changes: 9 additions & 0 deletions tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ echo "Installing dbt packages..."

pip install -r /app/aspects/dbt/requirements.txt

{% if DBT_SSH_KEY %}
mkdir -p /root/.ssh
echo "{{ DBT_SSH_KEY}}" | tr -d '\r' > /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa
eval `ssh-agent -s`
ssh -o StrictHostKeyChecking=no [email protected] || true
ssh-add /root/.ssh/id_rsa
{% endif %}

rm -rf {{ DBT_REPOSITORY_PATH }}

echo "Installing aspects-dbt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ echo "Installing dbt packages..."

pip install -r /app/aspects/dbt/requirements.txt

{% if DBT_SSH_KEY %}
mkdir -p /root/.ssh
echo "{{ DBT_SSH_KEY}}" | tr -d '\r' > /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa
eval `ssh-agent -s`
ssh -o StrictHostKeyChecking=no [email protected] || true
ssh-add /root/.ssh/id_rsa
{% endif %}

rm -rf {{ DBT_REPOSITORY_PATH }}

echo "Installing aspects-dbt"
Expand Down
Loading