Skip to content

Commit

Permalink
prefix env secrets with DBT_ENV_SECRET_
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Apr 25, 2024
1 parent c5742f2 commit ac48317
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ jobs:
DD_ENV: ci
DD_SERVICE: ${{ github.event.repository.name }}
DBT_DATABRICKS_CLUSTER_NAME: ${{ secrets.DBT_DATABRICKS_CLUSTER_NAME }}
DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_ENV_SECRET_DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_DATABRICKS_USER: ${{ secrets.DBT_DATABRICKS_USERNAME }}
DBT_TEST_USER_1: "[email protected]"
DBT_TEST_USER_2: "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ jobs:
DD_ENV: ci
DD_SERVICE: ${{ github.event.repository.name }}
DBT_DATABRICKS_CLUSTER_NAME: ${{ secrets.DBT_DATABRICKS_CLUSTER_NAME }}
DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_ENV_SECRET_DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_DATABRICKS_USER: ${{ secrets.DBT_DATABRICKS_USERNAME }}
DBT_TEST_USER_1: "[email protected]"
DBT_TEST_USER_2: "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ jobs:
DD_ENV: ci
DD_SERVICE: ${{ github.event.repository.name }}
DBT_DATABRICKS_CLUSTER_NAME: ${{ secrets.DBT_DATABRICKS_CLUSTER_NAME }}
DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME: ${{ secrets.DBT_DATABRICKS_HOST_NAME }}
DBT_ENV_SECRET_DBT_DATABRICKS_ENDPOINT: ${{ secrets.DBT_DATABRICKS_ENDPOINT }}
DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN: ${{ secrets.DBT_DATABRICKS_TOKEN }}
DBT_DATABRICKS_USER: ${{ secrets.DBT_DATABRICKS_USERNAME }}
DBT_TEST_USER_1: "[email protected]"
DBT_TEST_USER_2: "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions test.env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Cluster ID
DBT_DATABRICKS_CLUSTER_NAME=
# SQL Endpoint
DBT_DATABRICKS_ENDPOINT=
DBT_ENV_SECRET_DBT_DATABRICKS_ENDPOINT=
# Server Hostname value
DBT_DATABRICKS_HOST_NAME=
DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME=
# personal token
DBT_DATABRICKS_TOKEN=
DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN=
# file path to local ODBC driver
ODBC_DRIVER=

Expand Down
14 changes: 7 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def databricks_cluster_target():
return {
"type": "spark",
"method": "odbc",
"host": os.getenv("DBT_DATABRICKS_HOST_NAME"),
"host": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME"),
"cluster": os.getenv("DBT_DATABRICKS_CLUSTER_NAME"),
"token": os.getenv("DBT_DATABRICKS_TOKEN"),
"token": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN"),
"driver": os.getenv("ODBC_DRIVER"),
"port": 443,
"connect_retries": 3,
Expand All @@ -68,9 +68,9 @@ def databricks_sql_endpoint_target():
return {
"type": "spark",
"method": "odbc",
"host": os.getenv("DBT_DATABRICKS_HOST_NAME"),
"endpoint": os.getenv("DBT_DATABRICKS_ENDPOINT"),
"token": os.getenv("DBT_DATABRICKS_TOKEN"),
"host": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME"),
"endpoint": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_ENDPOINT"),
"token": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN"),
"driver": os.getenv("ODBC_DRIVER"),
"port": 443,
"connect_retries": 3,
Expand All @@ -82,9 +82,9 @@ def databricks_sql_endpoint_target():
def databricks_http_cluster_target():
return {
"type": "spark",
"host": os.getenv("DBT_DATABRICKS_HOST_NAME"),
"host": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_HOST_NAME"),
"cluster": os.getenv("DBT_DATABRICKS_CLUSTER_NAME"),
"token": os.getenv("DBT_DATABRICKS_TOKEN"),
"token": os.getenv("DBT_ENV_SECRET_DBT_DATABRICKS_TOKEN"),
"method": "http",
"port": 443,
"connect_retries": 3,
Expand Down

0 comments on commit ac48317

Please sign in to comment.