Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a full deployment not called 'prod' for pex deploys #155

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Deploying to a deployment" reads a bit oddly


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