vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
refactor
c5902451905acdaa478f8476844ccd4a510d9ca9 · Keenan Nemetz · 17d ago · parent ec2aba4b
internal/server/ci.go → server/ci.go +10−10
| @@ -6,10 +6,10 @@ import ( | |||
| 6 | 6 | "strings" | |
| 7 | 7 | "time" | |
| 8 | 8 | ||
| 9 | "github.com/rodent-software/vole/internal/id" | ||
| 10 | "github.com/rodent-software/vole/internal/issues" | ||
| 11 | "github.com/rodent-software/vole/internal/runs" | ||
| 12 | "github.com/rodent-software/vole/internal/workflow" | ||
| 9 | "github.com/rodent-software/vole/ci" | ||
| 10 | "github.com/rodent-software/vole/ci/runs" | ||
| 11 | "github.com/rodent-software/vole/core/id" | ||
| 12 | "github.com/rodent-software/vole/metadata" | ||
| 13 | 13 | ) | |
| 14 | 14 | ||
| 15 | 15 | // watchSpool turns accepted pushes into queued CI runs. | |
| @@ -90,7 +90,7 @@ func (s *Server) enqueue(ev runs.Event) { | |||
| 90 | 90 | annotated = kind == "tag" | |
| 91 | 91 | } | |
| 92 | 92 | } | |
| 93 | wfs, problems := workflow.At(m.Git(), commit) | ||
| 93 | wfs, problems := ci.At(m.Git(), commit) | ||
| 94 | 94 | s.Log.Debug("ci: examined push", "repo", ev.Repo, "ref", ev.Ref, "workflows", len(wfs), "problems", len(problems)) | |
| 95 | 95 | if len(problems) > 0 { | |
| 96 | 96 | // pre-receive rejects these, so reaching here means a workflow was already | |
| @@ -217,7 +217,7 @@ func (s *Server) reconcileRefs() { | |||
| 217 | 217 | for ref, tip := range refs { | |
| 218 | 218 | // The metadata branch carries human-authored entities and run records; the | |
| 219 | 219 | // runner's own push of a record must not queue a build of the tool's data. | |
| 220 | if ref == issues.Ref { | ||
| 220 | if ref == metadata.Ref { | ||
| 221 | 221 | continue | |
| 222 | 222 | } | |
| 223 | 223 | if !strings.HasPrefix(ref, "refs/heads/") && !strings.HasPrefix(ref, "refs/tags/") { | |
| @@ -253,7 +253,7 @@ func (s *Server) reconcileRefs() { | |||
| 253 | 253 | } | |
| 254 | 254 | ||
| 255 | 255 | // releasePaths picks the patterns that also publish to the tag's release. | |
| 256 | func releasePaths(job workflow.Job) []string { | ||
| 256 | func releasePaths(job ci.Job) []string { | ||
| 257 | 257 | var out []string | |
| 258 | 258 | for _, a := range job.Artifacts { | |
| 259 | 259 | if a.Release { | |
| @@ -263,7 +263,7 @@ func releasePaths(job workflow.Job) []string { | |||
| 263 | 263 | return out | |
| 264 | 264 | } | |
| 265 | 265 | ||
| 266 | func steps(job workflow.Job) []runs.Step { | ||
| 266 | func steps(job ci.Job) []runs.Step { | ||
| 267 | 267 | out := make([]runs.Step, 0, len(job.Steps)) | |
| 268 | 268 | for _, st := range job.Steps { | |
| 269 | 269 | // The step list is pinned at enqueue time, so editing the workflow after the | |
| @@ -276,7 +276,7 @@ func steps(job workflow.Job) []runs.Step { | |||
| 276 | 276 | // artifactPaths pins the declared patterns into the queued run, next to the pinned | |
| 277 | 277 | // steps: a workflow edited after the push must not change what an already-queued | |
| 278 | 278 | // run publishes. | |
| 279 | func artifactPaths(job workflow.Job) []string { | ||
| 279 | func artifactPaths(job ci.Job) []string { | ||
| 280 | 280 | out := make([]string, 0, len(job.Artifacts)) | |
| 281 | 281 | for _, a := range job.Artifacts { | |
| 282 | 282 | out = append(out, a.Path) | |
| @@ -287,7 +287,7 @@ func artifactPaths(job workflow.Job) []string { | |||
| 287 | 287 | // pagesPath pins the site directory into the queued run, like the steps and the | |
| 288 | 288 | // artifact patterns: a workflow edited afterwards must not change what a queued run | |
| 289 | 289 | // publishes. | |
| 290 | func pagesPath(job workflow.Job) string { | ||
| 290 | func pagesPath(job ci.Job) string { | ||
| 291 | 291 | if job.Pages == nil { | |
| 292 | 292 | return "" | |
| 293 | 293 | } | |