Continuous delivery model: IPublishTarget, channels, environments (ADR-0009)#498
Draft
ChrisonSimtian wants to merge 3 commits into
Draft
Continuous delivery model: IPublishTarget, channels, environments (ADR-0009)#498ChrisonSimtian wants to merge 3 commits into
ChrisonSimtian wants to merge 3 commits into
Conversation
Complements ADR-0001 (CD mechanism: attributes/tasks/hybrid) with the domain model our release flow reasons in: release → channel → environment → target → deployment, and the build-once/promote-within-a-channel invariant. Records the decisions on environments-as-target-groups, the GitHub realization (per-target environments + a single production gate), targets spanning environments, and cross-repo targets. Settles the DeploymentTarget half of Fallout-build#334 / epic Fallout-build#332. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalize the NuGet-feed-shaped PublishTarget into an IPublishTarget interface so a single build fans out to many kinds of destination (feeds, GitHub Releases, Homebrew, docs) — the DeploymentTarget of Fallout-build#334, per ADR-0009. - New experimental types (FALLOUT005): IPublishTarget, Artifact/ArtifactKind, Channel, DeploymentEnvironment, DeploymentContext, and a GitHubReleaseTarget stub (deploy path builds on GitHubReleaseTasks from ADR-0001, tracked by Fallout-build#334). - PublishTarget now implements IPublishTarget: it is the NuGet-feed provider and owns its own DeployAsync (the push logic moved off IPublish.Publish onto the target). IPublish.PublishTargets returns IEnumerable<IPublishTarget>; Publish builds one immutable artifact and deploys it to each accepting target. - TransitionShimGenerator now skips [Experimental] types — they are new, opt-in surface with no pre-rename Nuke.* consumers to bridge, and shimming them leaked the error-by-default experimental diagnostic into generated code. - Register FALLOUT005 in the experimental-API registry. First cut for a draft/discussion PR. Deferred to refinement: the GitHub provider implementations (GitHubReleaseTasks, GitHubEnvironment sync), the reusable publish workflows, Homebrew/docs targets, and diagram generation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Consolidate the six behavioural partials (CodeGeneration, PublicApi, Licenses, Contributors, Stargazers, GlobalSolution) into a single Build.Maintenance.cs, and drop the Build.RunTargetInDockerTest.cs demo target. The attribute-bearing partials (Build.CI.GitHubActions, Build.Terminal) stay separate — class-level attributes can't be merged. build/ goes from 10 .cs files to 4. - Fix .editorconfig end_of_line crlf -> lf so it matches the repo (all LF via .gitattributes); crlf made dotnet format rewrite the whole tree and unusable. Build files now pass dotnet format cleanly. - Sort usings, drop a stray private modifier, normalize attribute spacing, and replace legacy new string[0] with []. - Correct conventions.md + CONTRIBUTING.md: they claimed .editorconfig / *.DotSettings were removed, but both exist and are actively curated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft / discussion piece. First cut of Fallout's CD domain model — for maintainer review before the provider implementations land. Builds on ADR-0001; settles the
DeploymentTargethalf of #334 / epic #332.The model (ADR-0009)
A coherent vocabulary on top of ADR-0001's mechanism:
v*tag), built once.packages,assemblies,releasenotes,symbols,source,documentation,homebrew-formula.nuget.org,github-packages,github-releases,homebrew,docs) implementingIPublishTarget.Dev→Staging→Production) that groups targets and carries a gate.preview→Dev,Staging;release→Dev,Staging,Production).Invariant: build once; promote that single immutable artifact through a channel's environments; never promote across channels (a
-previewbuild is never re-versioned into GA). This is why "build once" and "Dev→Staging→Prod" are both true — maturity is fixed at build time; environments only control distribution reach.Two layers: the domain model is provider-neutral; the GitHub realization maps each target to a GitHub Environment (per-target Deployment records) with a single
productionenv as the promotion gate. Full rationale + mermaid diagram indocs/adr/0009-continuous-delivery-model.md.Code in this cut (all
[Experimental("FALLOUT005")])IPublishTarget— generalizes the NuGet-feed-shapedPublishTarget(which now implements it and owns its ownDeployAsync).IPublish.PublishTargets→IEnumerable<IPublishTarget>;Publishbuilds oneArtifactand fans it out.Artifact/ArtifactKind,Channel,DeploymentEnvironment,DeploymentContext.GitHubReleaseTarget— a second implementation (stub; deploy path builds onGitHubReleaseTasksfrom ADR-0001, tracked by First-class ReleaseChannel / DeploymentTarget / Environment model #334).TransitionShimGeneratornow skips[Experimental]types — new opt-in surface has noNuke.*consumers to bridge, and shimming it leaked the experimental diagnostic into generated code.Decisions captured
main(v10.4 bridge); model is version-scheme-agnostic.productiongate.github-packagesspans Staging + Production;github-releasesis Production (optional pre-release in Staging).repository_dispatch.Deferred to refinement passes (weekend work)
GitHubReleaseTasks,GitHubEnvironmentsync (ADR-0001 patterns).publish-{artifact}-{target}workflows + build-once release orchestrator.Verification
dotnet fallout Test Pack→ green; all relevant specs pass (incl. newPublishTargetSpecs, all shim specs). The 3GitRepositoryWorktreeSpecsfailures are pre-existing and environment-specific (reproduce on a clean base), unrelated to this change.