-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.dhall
85 lines (81 loc) · 3.28 KB
/
defaults.dhall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{- Default attributes
-}
let types = ./types.dhall
let Gerrit = ./defaults/gerrit.dhall
let PipelineCheck =
{ Type =
types.Pipeline.Config
, default =
{ name =
"check"
, description = Some "The check pipeline"
, precedence = types.Pipeline.Precedence.low
, manager = types.Pipeline.Manager.Independent
, config =
{ require =
{ Gerrit =
λ(connection : types.Connection)
→ { open = Some True
, current-patchset = Some True
, approval = None types.Gerrit.Approval
}
, Pagure = { merged = Some False }
}
, trigger =
{ Gerrit =
λ ( connection
: types.Connection
)
→ [ Gerrit.Trigger::{
, event = types.Gerrit.Event.patchset-created
}
, Gerrit.Trigger::{
, event = types.Gerrit.Event.change-restored
}
, Gerrit.Trigger::{
, event = types.Gerrit.Event.comment-added
, comment =
Some
''
(?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*(recheck|reverify)
''
}
, Gerrit.Trigger::{
, event = types.Gerrit.Event.comment-added
, approval = Some [ Gerrit.Approval.Workflow +1 ]
, require-approval =
Some
[ Gerrit.Approval.Verified [ -1, -2 ]
# Gerrit.Approval.Username connection.user
]
}
]
, Pagure =
[ { event = "pg_pull_request", action = "opened" } ]
}
, start =
{ Gerrit =
λ(connection : types.Connection) → { Verified = +0 }
, Pagure = { status = "pending", comment = False }
, Mqtt =
{ topic = "zuul/{pipeline}/start/{project}/{branch}" }
}
: types.Pipeline.StatusConfig
, success =
{ Gerrit =
λ(connection : types.Connection) → { Verified = +1 }
, Pagure = { status = "success", comment = True }
, Mqtt =
{ topic = "zuul/{pipeline}/result/{project}/{branch}" }
}
, failure =
{ Gerrit =
λ(connection : types.Connection) → { Verified = -1 }
, Pagure = { status = "failure", comment = True }
, Mqtt =
{ topic = "zuul/{pipeline}/result/{project}/{branch}" }
}
}
}
}
in { PipelineCheck = PipelineCheck }