Skip to content

Commit

Permalink
Add Python version env var for GitLab
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed May 6, 2024
1 parent 59d65d5 commit 37fa10d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ __pycache__/
src/pex-builder/build

# locally built wheels for Dockerfile.dagster-manylinux-builder
wheels/*whl
wheels/*whl

# PyCharm IDE Config files
.idea/
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.8'

deploy-branch:
stage: deploy
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.8'

deploy-branch:
stage: deploy
Expand Down
3 changes: 3 additions & 0 deletions src/gitlab_action/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@


def deploy(dagster_cloud_yaml_file, deployment=None):
python_version = os.environ["PYTHON_VERSION"]

url = os.environ["DAGSTER_CLOUD_URL"]
if not os.getenv("SERVERLESS_BASE_IMAGE_PREFIX"):
base_image_prefix = "657821118200.dkr.ecr.us-west-2.amazonaws.com/dagster-cloud-serverless-base-"
Expand Down Expand Up @@ -39,6 +41,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 37fa10d

Please sign in to comment.