Commit 7add1e55 authored by Cédric OLIVIER's avatar Cédric OLIVIER Committed by Pierre Smeyers
Browse files

feat(docker image): switch to dbt official image

parent 108677c9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -78,13 +78,15 @@ The dbt template uses some global configuration used throughout all jobs.

| Input / Variable | Description                            | Default value     |
| --------------------- | -------------------------------------- | ----------------- |
| `image` / `DBT_IMAGE` | The Docker image used to run dbt       | `registry.hub.docker.com/library/python:latest`   |
| `image` / `DBT_IMAGE` | The Docker image used to run dbt       | `ghcr.io/dbt-labs/dbt-core:latest`   |
| `project-dir` / `DBT_PROJECT_DIR` | The [dbt_project.yml](https://docs.getdbt.com/reference/dbt_project.yml) dir       | `.`   |
| `profiles-dir` / `DBT_PROFILES_DIR` | The dbt [profile](https://docs.getdbt.com/dbt-cli/configure-your-profile) location       | `.`   |
| `adapter` / `DBT_ADAPTER` | The dbt [adapter](https://docs.getdbt.com/docs/available-adapters) to use       | __none__ (required)  |
| `target` / `DBT_TARGET` | The dbt [target](https://docs.getdbt.com/reference/dbt-jinja-functions/target) to use  |  __none__ (required)  |
| `build-args` / `DBT_BUILD_ARGS` | Arguments used by [`dbt cli`](https://docs.getdbt.com/reference/global-configs#command-line-flags)      | __none__          |

`dbt` official images depending your adapter can be found on [dbt documentation](https://docs.getdbt.com/docs/core/docker-install#install-a-dbt-docker-image-from-github-packages) and on [dbt github packages](https://github.com/orgs/dbt-labs/packages?visibility=public)

### Environments configuration

As seen above, the dbt template may support up to 4 environments (`review`, `integration`, `staging` and `production`).
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
    {
      "name": "DBT_IMAGE",
      "description": "The Docker image used to run dbt",
      "default": "registry.hub.docker.com/library/python:latest"
      "default": "ghcr.io/dbt-labs/dbt-core:latest"
    },
    {
      "name": "DBT_PROJECT_DIR",
+4 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ spec:
  inputs:
    image:
      description: The Docker image used to run dbt
      default: registry.hub.docker.com/library/python:latest
      default: ghcr.io/dbt-labs/dbt-core:latest
    project-dir:
      description: The [dbt_project.yml](https://docs.getdbt.com/reference/dbt_project.yml) dir
      default: .
@@ -404,7 +404,9 @@ stages:
# job prototype
# defines default Docker image, tracking probe, cache policy and tags
.dbt-base:
  image: $DBT_IMAGE
  image: 
    name: $DBT_IMAGE
    entrypoint: [""]
  services:
    - name: "$TBC_TRACKING_IMAGE"
      command: ["--service", "dbt", "4.0.0"]