From 26e5b94ce462353ccc2cd0ea87f7f4d80a712e47 Mon Sep 17 00:00:00 2001 From: kgpayne Date: Fri, 16 Apr 2021 15:47:10 +0100 Subject: [PATCH] Fixed CI/CD (#24) * Capturing exposures data (#18) * Added three models to capture exposures data: stg, dim and fct. * Refactored fct model to adhere to dbt style guide. * Fix indentation bug. * CI Build * CI Build * CI Build * Still fighting CI. * Verify dbt is running from the correct dir. * Fix CI/CD * Maybe its quoting? * Update seeds config. * Last try before removing --warn-error * Remove --warn-error Co-authored-by: Konrad <77880496+kon-mal@users.noreply.github.com> --- .circleci/config.yml | 31 +++++++++---------- integration_tests/dbt_project.yml | 4 +-- .../{ci/sample.profiles.yml => profiles.yml} | 0 3 files changed, 15 insertions(+), 20 deletions(-) rename integration_tests/{ci/sample.profiles.yml => profiles.yml} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b137eae..259c59bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,31 +17,28 @@ jobs: command: | python3 -m venv venv . venv/bin/activate - pip install --upgrade pip setuptools pip install dbt --upgrade - mkdir -p ~/.dbt - cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml - - run: name: "Run Tests - Snowflake" command: | . venv/bin/activate cd integration_tests - echo `pwd` - dbt --warn-error deps --target snowflake - dbt --warn-error run-operation create_artifact_resources --target snowflake - dbt --warn-error seed --target snowflake --full-refresh - dbt --warn-error run-operation upload_dbt_artifacts --args '{filenames: [manifest, run_results]}' --target snowflake - dbt --warn-error run --target snowflake - dbt --warn-error run-operation upload_dbt_artifacts --args '{filenames: [manifest, run_results]}' --target snowflake - dbt --warn-error test --target snowflake - dbt --warn-error run-operation upload_dbt_artifacts --args '{filenames: [run_results]}' --target snowflake - dbt --warn-error source snapshot-freshness --target snowflake - dbt --warn-error run-operation upload_dbt_artifacts --args '{filenames: [sources]}' --target snowflake - dbt --warn-error docs generate --target snowflake - dbt --warn-error run-operation upload_dbt_artifacts --args '{filenames: [catalog]}' --target snowflake + export DBT_PROFILES_DIR=/home/circleci/project/integration_tests + echo $DBT_PROFILES_DIR + dbt deps + dbt run-operation create_artifact_resources + dbt seed --full-refresh + dbt run-operation upload_dbt_artifacts --args '{filenames: [manifest, run_results]}' + dbt run + dbt run-operation upload_dbt_artifacts --args '{filenames: [manifest, run_results]}' + dbt test + dbt run-operation upload_dbt_artifacts --args '{filenames: [run_results]}' + dbt source snapshot-freshness + dbt run-operation upload_dbt_artifacts --args '{filenames: [sources]}' + dbt docs generate + dbt run-operation upload_dbt_artifacts --args '{filenames: [catalog]}' - save_cache: key: deps1-{{ .Branch }} diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index b638ea72..cd8b5d7f 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -11,9 +11,7 @@ data-paths: ["data"] macro-paths: ["macros"] target-path: "target" -clean-targets: -- "target" -- "dbt_modules" +clean-targets: ["target", "dbt_modules"] seeds: +quote_columns: false diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/profiles.yml similarity index 100% rename from integration_tests/ci/sample.profiles.yml rename to integration_tests/profiles.yml