Build definitions with onPush/atTimes replace branch-owned schedules
ADR 0007: the YAML builds section (next to the reserved maxConcurrent key) defines named builds (jobs) with onPush/atTimes triggers, branch selectors (name globs, activeWithin age filter), and build-setting overrides applied last over the merged branch config. The implicit default build (onPush over all branches) preserves the previous behavior; the section is pinned against the worktree layer. Results record the job name; restart, retry, and startup recovery re-run by it, resolving settings from the current config. A non-default build records under the <branch>@<build> pool with its own row, retention count, and permanent latest-green link. branches.*.autoBuild stays as a deprecated alias (plain times only); the unreleased-in-practice v0.9.13 per-slot buildCommand/name syntax is removed again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
5051c7bb99
commit
0e8db18e69
@@ -140,6 +140,19 @@ class GitService(
|
||||
}.map { (branch, _) -> branch }
|
||||
}
|
||||
|
||||
/** Committer timestamps of all origin branch heads, in one git call; used by `activeWithin` build selectors. */
|
||||
fun originBranchCommitTimes(workingDir: Path = Paths.get(".")): Map<String, Instant> =
|
||||
runner
|
||||
.runOrThrow(
|
||||
listOf("git", "for-each-ref", "--format=%(refname:strip=3) %(committerdate:unix)", "refs/remotes/origin"),
|
||||
workingDir,
|
||||
).lines()
|
||||
.mapNotNull { line ->
|
||||
val branch = line.substringBeforeLast(' ')
|
||||
val epochSeconds = line.substringAfterLast(' ').toLongOrNull() ?: return@mapNotNull null
|
||||
if (branch == "HEAD") null else branch to Instant.ofEpochSecond(epochSeconds)
|
||||
}.toMap()
|
||||
|
||||
/** Switches to an existing local branch, or creates a tracking branch from origin. */
|
||||
fun checkout(
|
||||
branch: String,
|
||||
|
||||
Reference in New Issue
Block a user