Skip to content
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
6 changes: 6 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,9 @@ Installation links use the configured App identity. For authoring deployments wi
Run the existing schema initialization command before starting updated API and worker processes. The upgrade adds GitHub repository IDs and a deployment activation flag. Existing repository records keep deployments enabled; new discovery records start disabled. Settings and grants follow repository renames by GitHub ID. Revoked repositories retain their settings for restoration.

See [database migrations](database-migrations.md) for migration authoring, debug Adminer, drift checks, and the fresh-baseline transition.

## Repository layouts

Use Single deployment (`single`), Environment files (`env-files`), or Environment directories (`folders`). Automatic discovery rejects mixed environment-file and environment-directory layouts; select an explicit mode or reorganize the repository. Obsolete mode values must be replaced in Deployment settings before execution. Platform still configures one root per repository.

Follow [the application example](https://github.com/ci-sourcerer/stacksmith-example-app) for deployment onboarding and its pinned [managed configuration](https://github.com/ci-sourcerer/stacksmith-example-platform). The bundled Lambda example demonstrates Composer authoring and policy, independently of deployment setup.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = [
"kubernetes>=32,<36",
"python-dotenv>=1,<2",
"alembic>=1.18,<2",
"stacksmith @ git+https://github.com/ci-sourcerer/stacksmith@b113deb524078e31ce4dbc44ce3ce0f61411f32e",
"stacksmith @ git+https://github.com/ci-sourcerer/stacksmith@e34e3d26287165e12a3f6653f74c2194a5634462",
]
dynamic = ["version"]

Expand Down
12 changes: 3 additions & 9 deletions src/stacksmith_platform/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ class DeploymentDiscoveryInput(Input):
"""Repository deployment discovery options."""

gitops_root: str | None = None
discovery_mode: Literal["auto", "single", "folders", "flat-files", "env-files"] = (
"auto"
)
discovery_mode: Literal["auto", "single", "folders", "env-files"] = "auto"

@field_validator("gitops_root")
@classmethod
Expand All @@ -111,9 +109,7 @@ class DeploymentConfigurationInput(Input):

revision: str = Field(pattern=r"^[0-9a-f]{40}$")
gitops_root: str = ""
discovery_mode: Literal["auto", "single", "folders", "flat-files", "env-files"] = (
"auto"
)
discovery_mode: Literal["auto", "single", "folders", "env-files"] = "auto"
lock_key: str = Field(default="", max_length=200)
locked: bool
automatic: bool
Expand Down Expand Up @@ -144,9 +140,7 @@ class EnvironmentInput(Input):

name: str = Field(default="default", pattern=r"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$")
gitops_root: str = "."
discovery_mode: Literal["auto", "single", "folders", "flat-files", "env-files"] = (
"auto"
)
discovery_mode: Literal["auto", "single", "folders", "env-files"] = "auto"
lock_key: str = Field(default="", max_length=200)
locked: bool = True
automatic: bool = True
Expand Down
2 changes: 1 addition & 1 deletion tests/test_authoring_inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_environment_inputs_substitute_draft_without_changing_stack_layer_order(
)


@pytest.mark.parametrize("mode", ["single", "folders", "flat-files", "env-files"])
@pytest.mark.parametrize("mode", ["single", "folders", "env-files"])
def test_inspection_uses_selected_discovery_mode(context_runtime, mode):
context_runtime.inspection["context"]["settings"]["discovery_mode"] = mode
if mode == "single":
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions web/src/PlatformApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2044,8 +2044,7 @@ function deploymentModeLabel(mode: string) {
return (
{
single: "Single deployment",
folders: "Environment folders",
"flat-files": "Environment files in one directory",
folders: "Environment directories",
"env-files": "Environment files",
}[mode] ?? mode
);
Expand Down Expand Up @@ -2330,10 +2329,7 @@ function DeploymentSetup({
>
<option value="auto">Detect automatically</option>
<option value="single">Single deployment</option>
<option value="folders">Environment folders</option>
<option value="flat-files">
Environment files in one directory
</option>
<option value="folders">Environment directories</option>
<option value="env-files">Environment files</option>
</select>
</SettingsField>
Expand Down Expand Up @@ -2444,10 +2440,7 @@ function DeploymentSetup({
>
<option value="auto">Detect automatically</option>
<option value="single">Single deployment</option>
<option value="folders">Environment folders</option>
<option value="flat-files">
Environment files in one directory
</option>
<option value="folders">Environment directories</option>
<option value="env-files">Environment files</option>
</select>
</SettingsField>
Expand Down