Loading templates/gitlab-ci-dbt.yml +3 −1 Original line number Diff line number Diff line Loading @@ -435,7 +435,6 @@ stages: - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - assert_defined "${DBT_ADAPTER}" 'Missing required dbt adapter' - install_requirements - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" # Cache downloaded dependencies and plugins between builds. cache: # cache shall be per branch per template Loading @@ -462,6 +461,7 @@ dbt-sqlfluff-lint: script: - assert_defined "${ENV_TARGET:-${DBT_TARGET}}" 'Missing required dbt target' - mkdir -p ${DBT_PROJECT_DIR}/reports - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt compile --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" ${DBT_BUILD_ARGS} - dbt docs generate --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" --no-compile ${DBT_BUILD_ARGS} - dbt-coverage compute doc --project-dir "${DBT_PROJECT_DIR}" --cov-report ${DBT_PROJECT_DIR}/reports/dbt-coverage.native.json Loading Loading @@ -522,6 +522,7 @@ dbt-build-production: needs: [] script: - mkdir -p ${DBT_PROJECT_DIR}/reports - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt test --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" ${DBT_TEST_ARGS} - dbt_junit_report ${DBT_PROJECT_DIR}/target/run_results.json ${DBT_PROJECT_DIR}/reports/dbt-test.xunit.xml # keep build artifacts and test reports (see: https://docs.gitlab.com/ee/ci/yaml/#artifactsreportsjunit) Loading Loading @@ -610,6 +611,7 @@ dbt-test-production: extends: .dbt-base stage: deploy script: - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt build --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" ${DBT_BUILD_ARGS} # keep build artifacts and test reports (see: https://docs.gitlab.com/ee/ci/yaml/#artifactsreportsjunit) # artifacts: Loading Loading
templates/gitlab-ci-dbt.yml +3 −1 Original line number Diff line number Diff line Loading @@ -435,7 +435,6 @@ stages: - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - assert_defined "${DBT_ADAPTER}" 'Missing required dbt adapter' - install_requirements - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" # Cache downloaded dependencies and plugins between builds. cache: # cache shall be per branch per template Loading @@ -462,6 +461,7 @@ dbt-sqlfluff-lint: script: - assert_defined "${ENV_TARGET:-${DBT_TARGET}}" 'Missing required dbt target' - mkdir -p ${DBT_PROJECT_DIR}/reports - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt compile --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" ${DBT_BUILD_ARGS} - dbt docs generate --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" --no-compile ${DBT_BUILD_ARGS} - dbt-coverage compute doc --project-dir "${DBT_PROJECT_DIR}" --cov-report ${DBT_PROJECT_DIR}/reports/dbt-coverage.native.json Loading Loading @@ -522,6 +522,7 @@ dbt-build-production: needs: [] script: - mkdir -p ${DBT_PROJECT_DIR}/reports - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt test --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" ${DBT_TEST_ARGS} - dbt_junit_report ${DBT_PROJECT_DIR}/target/run_results.json ${DBT_PROJECT_DIR}/reports/dbt-test.xunit.xml # keep build artifacts and test reports (see: https://docs.gitlab.com/ee/ci/yaml/#artifactsreportsjunit) Loading Loading @@ -610,6 +611,7 @@ dbt-test-production: extends: .dbt-base stage: deploy script: - dbt deps --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" - dbt build --project-dir "${DBT_PROJECT_DIR}" --profiles-dir "${DBT_PROFILES_DIR}" --target "${ENV_TARGET:-${DBT_TARGET}}" ${DBT_BUILD_ARGS} # keep build artifacts and test reports (see: https://docs.gitlab.com/ee/ci/yaml/#artifactsreportsjunit) # artifacts: Loading