Skip to content

Commit

Permalink
Allow a full deployment not called 'prod' for pex deploys (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
shalabhc authored Oct 13, 2023
1 parent c44fae7 commit 486de0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions actions/build_deploy_python_executable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: 'Python version string, major.minor only, eg "3.8"'
required: false
default: '3.8'
deployment:
required: false
description: "The deployment to push to, defaults to 'prod'. Ignored for pull requests where the branch deployment is used."
default: "prod"
deploy:
description: 'Whether to upload the code files and update the code location'
required: false
Expand Down Expand Up @@ -61,6 +65,7 @@ runs:
- if: ${{ inputs.deploy == 'true' }}
run: >
cd $ACTION_REPO &&
INPUT_DEPLOYMENT=${{ inputs.deployment }}
/usr/bin/python src/deploy_pex.py
${{ inputs.dagster_cloud_file }}
--python-version=${{ inputs.python_version }}
Expand Down
5 changes: 3 additions & 2 deletions src/deploy_pex.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def main():
project_dir = os.path.dirname(dagster_cloud_yaml)
deployment_name = get_branch_deployment_name(project_dir)
else:
print("Going to do a full deployment.", flush=True)
deployment_name = None
# INPUT_DEPLOYMENT is to the `deployment:` input value in action.yml
deployment_name = os.getenv("INPUT_DEPLOYMENT", "prod")
print(f"Deploying to a full deployment: {deployment_name}", flush=True)

ubuntu_version = get_runner_ubuntu_version()
print("Running on Ubuntu", ubuntu_version, flush=True)
Expand Down

0 comments on commit 486de0d

Please sign in to comment.