Skip to content

Commit

Permalink
Also pass python_version through GL action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsanders committed Mar 27, 2024
1 parent 09f1ac2 commit 055a9f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions gitlab/dbt/serverless-ci-dbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ variables:
DAGSTER_DBT_PROJECT_NAME: $DAGSTER_DBT_LOCATION_NAME
DAGSTER_DBT_PROJECT_DIR: "${CI_PROJECT_DIR}"
DAGSTER_DBT_PACKAGE_DATA_DIR: "${CI_PROJECT_DIR}/$DAGSTER_DBT_PROJECT_NAME/dbt-project"
PYTHON_VERSION: "3.11"

deploy-branch:
stage: deploy
Expand Down
2 changes: 2 additions & 0 deletions gitlab/hybrid-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ variables:

# Internally used directory name for build state
DAGSTER_BUILD_STATEDIR: build-state

PYTHON_VERSION: "3.11"
stages:
- setup
- build
Expand Down
1 change: 1 addition & 0 deletions gitlab/serverless-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ variables:
DISABLE_FAST_DEPLOYS:
DAGSTER_CLOUD_URL: $DAGSTER_CLOUD_URL
DAGSTER_CLOUD_API_TOKEN: $DAGSTER_CLOUD_API_TOKEN
PYTHON_VERSION: "3.11"

deploy-branch:
stage: deploy
Expand Down
2 changes: 2 additions & 0 deletions src/gitlab_action/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def deploy(dagster_cloud_yaml_file, deployment=None):
project_url = os.getenv("CI_PROJECT_URL")
commit = os.getenv("CI_COMMIT_SHORT_SHA")
branch = os.getenv("CI_COMMIT_BRANCH") or os.getenv("CI_COMMIT_REF_NAME")
python_version = os.getenv("PYTHON_VERSION")

deps_cache = project + "/" + branch
commit_url = project_url + "/commit/" + commit
Expand All @@ -39,6 +40,7 @@ def deploy(dagster_cloud_yaml_file, deployment=None):
f"--deps-cache-to={deps_cache}",
f"--commit-hash={commit}",
f"--git-url={commit_url}",
f"--python-version={python_version}"
]
if deployment:
command_args.append(f"--url={url}/{deployment}")
Expand Down

0 comments on commit 055a9f8

Please sign in to comment.