Move the concurrency limit to executor.maxConcurrent
builds.maxConcurrent mixed an execution setting into the build definitions as a reserved key. The limit now lives in the new executor section (pinned like the builds section, enforced for all builds regardless of trigger), default 1, without a compatibility alias — a leftover builds.maxConcurrent key is rejected as an invalid build definition. Recorded as a follow-up in ADR 0007. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e118c239f8
commit
495b7f3282
@@ -1,18 +1,21 @@
|
||||
package de.hoennig.gittally.config
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
data class GitTallyConfig(
|
||||
val server: ServerConfig = ServerConfig(),
|
||||
val git: GitConfig = GitConfig(),
|
||||
val gitea: GiteaConfig = GiteaConfig(),
|
||||
val builds: BuildsConfig = BuildsConfig(),
|
||||
val executor: ExecutorConfig = ExecutorConfig(),
|
||||
val artifacts: ArtifactsConfig = ArtifactsConfig(),
|
||||
val watcher: WatcherConfig = WatcherConfig(),
|
||||
val branches: Map<String, BranchConfig> = mapOf("default" to BranchConfig()),
|
||||
/**
|
||||
* Named build definitions (jobs) over the branches (ADR 0007). The implicit
|
||||
* [BuildDefinition.DEFAULT] build (`onPush` over all branches) applies unless this
|
||||
* map overrides it; see [effectiveBuildDefinitions].
|
||||
* Named build definitions (jobs) over the branches (ADR 0007), the YAML `builds`
|
||||
* section. The implicit [BuildDefinition.DEFAULT] build (`onPush` over all
|
||||
* branches) applies unless this map overrides it; see [effectiveBuildDefinitions].
|
||||
*/
|
||||
@JsonProperty("builds")
|
||||
val buildDefinitions: Map<String, BuildDefinition> = emptyMap(),
|
||||
) {
|
||||
/** The configured [buildDefinitions] plus the implicit `default` build unless overridden. */
|
||||
@@ -78,11 +81,6 @@ data class GiteaConfig(
|
||||
val statusContext: String = "GitTally",
|
||||
)
|
||||
|
||||
data class BuildsConfig(
|
||||
/** How many branches may build at the same time; at most one build per branch regardless. */
|
||||
val maxConcurrent: Int = 1,
|
||||
)
|
||||
|
||||
data class ArtifactsConfig(
|
||||
val retentionPerBranch: Int = 3,
|
||||
/**
|
||||
@@ -156,6 +154,12 @@ data class DockerConfig(
|
||||
val env: Map<String, String> = emptyMap(),
|
||||
)
|
||||
|
||||
/** Build execution settings, enforced by the executor for all builds regardless of their trigger. */
|
||||
data class ExecutorConfig(
|
||||
/** How many builds may run at the same time; at most one build per branch runs regardless. */
|
||||
val maxConcurrent: Int = 1,
|
||||
)
|
||||
|
||||
/**
|
||||
* Deprecated per-branch schedule (pre-ADR-0007), kept for compatibility: mapped to a
|
||||
* daily rebuild of the branch's own pool with its regular command. New configurations
|
||||
|
||||
Reference in New Issue
Block a user