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

[dbt nux] Allow specifying custom code location name #152

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion github/serverless/dbt/branch_deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
rm ${{ env.DBT_PACKAGE_DATA_DIR }}/target/partial_parse.msgpack
shell: bash
env:
DAGSTER_PROJECT_NAME: 'dagster_dbt_scaffold'
DAGSTER_PROJECT_NAME: ${{ secrets.DAGSTER_DBT_LOCATION_NAME }}
DBT_PROJECT_DIR: "$GITHUB_WORKSPACE/project-repo"
DBT_PACKAGE_DATA_DIR: "$GITHUB_WORKSPACE/project-repo/$DAGSTER_PROJECT_NAME/dbt-project"

Expand Down
2 changes: 1 addition & 1 deletion github/serverless/dbt/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
rm ${{ env.DBT_PACKAGE_DATA_DIR }}/target/partial_parse.msgpack
shell: bash
env:
DAGSTER_PROJECT_NAME: 'dagster_dbt_scaffold'
DAGSTER_PROJECT_NAME: ${{ secrets.DAGSTER_DBT_LOCATION_NAME }}
DBT_PROJECT_DIR: "$GITHUB_WORKSPACE/project-repo"
DBT_PACKAGE_DATA_DIR: "$GITHUB_WORKSPACE/project-repo/$DAGSTER_PROJECT_NAME/dbt-project"

Expand Down
12 changes: 6 additions & 6 deletions gitlab/dbt/serverless-ci-dbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ variables:
DISABLE_FAST_DEPLOYS:
DAGSTER_CLOUD_URL: $DAGSTER_CLOUD_URL
DAGSTER_CLOUD_API_TOKEN: $DAGSTER_CLOUD_API_TOKEN
DAGSTER_PROJECT_NAME: "dagster_dbt_scaffold"
DAGSTER_DBT_PROJECT_NAME: $DAGSTER_DBT_LOCATION_NAME
DBT_PROJECT_DIR: "${CI_PROJECT_DIR}"
DBT_PACKAGE_DATA_DIR: "${CI_PROJECT_DIR}/$DAGSTER_PROJECT_NAME/dbt-project"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prefix these as DAGSTER_DBT instead of just DBT while we're at it

DBT_PACKAGE_DATA_DIR: "${CI_PROJECT_DIR}/$DAGSTER_DBT_PROJECT_NAME/dbt-project"

deploy-branch:
stage: deploy
Expand Down Expand Up @@ -32,12 +32,12 @@ deploy-branch:
--author-email $PR_EMAIL)
# install dbt package
- pip install pip --upgrade
- cd $DBT_PROJECT_DIR/$DAGSTER_PROJECT_NAME
- cd $DBT_PROJECT_DIR/$DAGSTER_DBT_PROJECT_NAME
- pip install . MarkupSafe==2.0.1 'click>8.1.0' 'Jinja2>3.0.0'
- pip install pyOpenSSL --upgrade
- cd -
- which rsync || ( apt-get update -y && apt-get -y install rsync )
- rsync -avz --exclude $DAGSTER_PROJECT_NAME --exclude .git $DBT_PROJECT_DIR/ $DBT_PACKAGE_DATA_DIR
- rsync -avz --exclude $DAGSTER_DBT_PROJECT_NAME --exclude .git $DBT_PROJECT_DIR/ $DBT_PACKAGE_DATA_DIR
- dbt deps --project-dir $DBT_PACKAGE_DATA_DIR --profiles-dir $DBT_PACKAGE_DATA_DIR
- dbt parse --project-dir $DBT_PACKAGE_DATA_DIR --profiles-dir $DBT_PACKAGE_DATA_DIR
- rm $DBT_PACKAGE_DATA_DIR/target/partial_parse.msgpack
Expand Down Expand Up @@ -78,12 +78,12 @@ deploy:
script:
# install dbt package
- pip install pip --upgrade
- cd $DBT_PROJECT_DIR/$DAGSTER_PROJECT_NAME
- cd $DBT_PROJECT_DIR/$DAGSTER_DBT_PROJECT_NAME
- pip install . MarkupSafe==2.0.1 'click>8.1.0' 'Jinja2>3.0.0'
- pip install pyOpenSSL --upgrade
- cd -
- which rsync || ( apt-get update -y && apt-get -y install rsync )
- rsync -avz --exclude $DAGSTER_PROJECT_NAME --exclude .git $DBT_PROJECT_DIR/ $DBT_PACKAGE_DATA_DIR
- rsync -avz --exclude $DAGSTER_DBT_PROJECT_NAME --exclude .git $DBT_PROJECT_DIR/ $DBT_PACKAGE_DATA_DIR
- dbt deps --project-dir $DBT_PACKAGE_DATA_DIR --profiles-dir $DBT_PACKAGE_DATA_DIR
- dbt parse --project-dir $DBT_PACKAGE_DATA_DIR --profiles-dir $DBT_PACKAGE_DATA_DIR
- rm $DBT_PACKAGE_DATA_DIR/target/partial_parse.msgpack
Expand Down