forked from
tangled.org/core
Monorepo for Tangled — https://tangled.org
1package models
2
3type Pipeline struct {
4 RepoOwner string
5 RepoName string
6 Workflows map[Engine][]Workflow
7}
8
9type Step interface {
10 Name() string
11 Command() string
12 Kind() StepKind
13}
14
15// SimpleStep is a minimal Step implementation for control log lines
16// that don't have a full step definition (e.g., setup errors).
17type SimpleStep struct {
18 N string
19 K StepKind
20 C string
21}
22
23func (s SimpleStep) Name() string {
24 return s.N
25}
26func (s SimpleStep) Command() string {
27 return s.C
28}
29func (s SimpleStep) Kind() StepKind {
30 return s.K
31}
32
33type StepKind int
34
35const (
36 // steps injected by the CI runner
37 StepKindSystem StepKind = iota
38 // steps defined by the user in the original pipeline
39 StepKindUser
40)
41
42type Workflow struct {
43 Steps []Step
44 Name string
45 Data any
46 Environment map[string]string
47}