implemented 05-artifact-store.md: filesystem artifact store with legacy-compatible naming, atomic persist from concurrent builds, retention pruning, and artifacts.rootDir config
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b379bc0a6b
commit
3c9eeda5da
@@ -5,6 +5,7 @@ import io.kotest.matchers.shouldBe
|
||||
import io.kotest.matchers.shouldNotBe
|
||||
import io.kotest.matchers.string.shouldContain
|
||||
import io.kotest.matchers.string.shouldMatch
|
||||
import java.nio.file.Paths
|
||||
import java.time.Instant
|
||||
|
||||
class ArtifactKeysTest : FunSpec() {
|
||||
@@ -34,5 +35,9 @@ class ArtifactKeysTest : FunSpec() {
|
||||
key shouldContain ArtifactKeys.branchKey("main")
|
||||
key shouldContain "2026-07-07T10_00_00Z"
|
||||
}
|
||||
|
||||
test("repoKey sanitizes the absolute repository path") {
|
||||
ArtifactKeys.repoKey(Paths.get("/home/user/my repo")) shouldBe "_home_user_my_repo"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class BuildExecutorTest : FunSpec() {
|
||||
verify { h.giteaClient.publishStatus("abc123", BuildStatus.PENDING, any(), null, h.workingDir) }
|
||||
verify { h.giteaClient.publishStatus("abc123", BuildStatus.RUNNING, any(), null, h.workingDir) }
|
||||
verify { h.giteaClient.publishStatus("abc123", BuildStatus.SUCCESS, any(), null, h.workingDir) }
|
||||
verify { h.artifactStore.persist(match { it.status == BuildStatus.SUCCESS }, build.stagingDir) }
|
||||
verify { h.artifactStore.persist(match { it.status == BuildStatus.SUCCESS }, build.stagingDir, h.workingDir) }
|
||||
}
|
||||
|
||||
test("build commands run in the workspace prepared for the branch") {
|
||||
|
||||
Reference in New Issue
Block a user