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

Add content to cumulusci.yml Pydantic models and JSON Schema #3724

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update StepUIOptions model based on MetaDeploy code
jlantz committed Dec 20, 2023
commit aba386bc23cd32f9c5b0eb5f9131bffda2da6df0
36 changes: 30 additions & 6 deletions cumulusci/utils/yaml/cumulusci_yml.py
Original file line number Diff line number Diff line change
@@ -69,11 +69,24 @@ class Config:
description = "A preflight check to run before a step or plan in MetaDeploy."


class StepUIOptionsKindEnum(StrEnum):
metadata = "Metadata"
onetime = "One Time Apex"
managed = "Managed Package"
data = "Data"
other = "Other"


class StepUIOptions(TypedDict):
name: str # Name of the step shown to the user.
is_required: bool # If True, the step will always be run.
is_recommended: bool # If True, the step will be run unless the user opts out.
is_optional: bool # If True, the step will be run only if the user opts in.
name: Optional[str] # Name of the step shown to the user.
description: Optional[str] # Description of the step shown to the user.
is_required: Optional[bool] # If True, the step will always be run.
is_recommended: Optional[
bool
] # If True, the step will be run unless the user opts out.
kind: Optional[
StepUIOptionsKindEnum
] # The kind of step. Used to group steps in the UI.


class Step(CCIDictModel):
@@ -117,8 +130,19 @@ class Step(CCIDictModel):
title="UI Options",
description="Options for the task or flow that are only used by MetaDeploy. For flows, this should be a dictionary with a key for the task name containing keys for each option.",
examples=[
{"name": "Deploy Recommended Config", "is_recommended": True},
{"name": "Deploy Optional Config", "is_optional": True},
{"name": "Deploy Required Config", "kind": "managed"},
{
"name": "Deploy Recommended Config",
"kind": "metadata",
"is_required": False,
"is_recommended": True,
},
{
"name": "Deploy Optional Config",
"kind": "other",
"is_required": False,
"is_recommended": False,
},
],
)
checks: List[PreflightCheck] = Field(