Class StaleSiteCleanupReconciler
- All Implemented Interfaces:
SiteReconciler
ReleaseSupport.SITE_DISK_BASE on
ReleaseSupport.SITE_SSH_HOST).
Subsumes the retired ike:clean-site goal
(IKE-Network/ike-issues#398). Most projects no longer use the scpexe
mirror (#304 retired it as the canonical distribution channel in
favor of GitHub Pages), but the directory may still exist from
before that change and shows up in ike:site-publish -Dsite=removed
runs as cleanup work.
Detect: read-only — does not SSH out to enumerate stale
dirs (that would slow site-draft for every project even when
nothing is wrong). Always reports SiteDriftReport.noDrift(String)
during a forward-deploy draft; the uninstall path (triggered by
-Dsite=removed) is the only time stale cleanup is in scope.
Apply: forward-deploy direction does nothing (this
reconciler is uninstall-only). The forward DeployedSiteReconciler
already publishes a fresh site.
Uninstall: SSH out and remove
/srv/ike-site/<projectId>/ (the release subtree). The
.staging / .old suffixes are handled by the same
ssh rm -rf since they're inside the same project tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(SiteContext ctx) Apply reconciliation.detect(SiteContext ctx) Inspect deployed site state and report any drift this reconciler would correct.Human-readable name of the dimension this reconciler owns.The Maven property name (without the-Dprefix) that opts out of this reconciler's apply pass.voiduninstall(SiteContext ctx) Apply the "uninstall" variant of this reconciler — used bysite-publish -Dsite=removedto tear down the deployed site and its registration.
-
Constructor Details
-
StaleSiteCleanupReconciler
public StaleSiteCleanupReconciler()Creates this reconciler instance.
-
-
Method Details
-
dimension
Description copied from interface:SiteReconcilerHuman-readable name of the dimension this reconciler owns. Used as the heading insite-draftoutput.- Specified by:
dimensionin interfaceSiteReconciler- Returns:
- the dimension label, e.g. "Deployed site version"
-
optOutFlag
Description copied from interface:SiteReconcilerThe Maven property name (without the-Dprefix) that opts out of this reconciler's apply pass. Setting the property to"false"skips this dimension on a givensite-publishinvocation.- Specified by:
optOutFlagin interfaceSiteReconciler- Returns:
- the opt-out flag name, e.g.
"updateSite"
-
detect
Description copied from interface:SiteReconcilerInspect deployed site state and report any drift this reconciler would correct. Read-only — must not mutate any remote state.- Specified by:
detectin interfaceSiteReconciler- Parameters:
ctx- the per-repo site context- Returns:
- drift report;
SiteDriftReport.noDrift(String)if nothing to do
-
apply
Description copied from interface:SiteReconcilerApply reconciliation. Caller is responsible for checkingSiteReconcilerOptions.isOptedOut(String)before invoking; implementations may also re-check defensively.- Specified by:
applyin interfaceSiteReconciler- Parameters:
ctx- the per-repo site context
-
uninstall
Description copied from interface:SiteReconcilerApply the "uninstall" variant of this reconciler — used bysite-publish -Dsite=removedto tear down the deployed site and its registration. Default implementation does nothing (reconcilers that only forward-deploy can be inverted by the stale-cleanup reconciler instead).- Specified by:
uninstallin interfaceSiteReconciler- Parameters:
ctx- the per-repo site context
-