Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Open
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
7 changes: 7 additions & 0 deletions freight/providers/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ def execute_deploy(self, workspace, deploy, task) -> None:
).raise_for_status()

for i, step in enumerate(config["steps"]):
step_environments = step.get("environments")
if step_environments and deploy.environment not in step_environments:
workspace.log.info(
f"Skipping Step {i+1} ({step['kind']})."
f" Configured for environments {step_environments} this is deploy environment is {deploy.environment}"
)
continue
workspace.log.info(f"Running Step {i+1} ({step['kind']})")
run_step(step, context)
workspace.log.info(f"Finished Step {i+1}")
Expand Down