forked from floeit/floe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
126 lines (110 loc) · 4.22 KB
/
config.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
common:
base-url: "/build/api"
store-type: local
hosts:
- http://127.0.0.1:8080
# - http://127.0.0.1:8090
flows:
- id: build-project # the name of this flow
name: Build Project
ver: 1
reuse-space: false # reuse the workspace (false) - if true /single used
resource-tags: [couchbase, nic] # resource labels that any other flows cant share
host-tags: [linux, go, couch] # all these tags must match the tags on any host for it to be able to run there
triggers: # external events to subscribe to
- name: push # name of this trigger
type: git-push # the type of this trigger
opts:
url: blah.blah # which url to monitor
- name: start
type: data
opts:
form:
title: Start
fields:
- id: ref
prompt: Ref (branch or hash)
type: text
value: master
- id: from-ref
prompt: Ref to merge (branch or hash)
type: text
tasks:
- name: Checkout # the name of this node
type: git-merge # the task type
listen: trigger.good # the event tag that triggers this node
good: [0] # define what the good statuses are, default [0]
ignore-fail: false # if true only emit good
opts:
sub-dir: src/github.com/floeit
url: [email protected]:floeit/floe.git
- name: Echo
type: exec
listen: task.checkout.good
opts:
cmd: "echo"
args: ["dan is a goon"]
- name: Build
type: exec
listen: task.checkout.good
opts:
cmd: "ls" # the command to execute
args: ["-lrt", "/"]
- name: Test
type: exec # execute a command
listen: task.build.good
opts:
shell: "sleep 10" # the command to execute
- name: Sign Off
type: data
listen: task.build.good # for a data node this event has to have occured before the data node can accept data
opts:
form:
title: Sign off Manual Testing
fields:
- id: tests_passed
prompt: Did the manual testing pass?
type: bool
- id: to_hash
prompt: To Branch (or hash)
type: string
- name: Wait For Tests and Sign Off
class: merge
id: signed
type: all
wait: [task.echo.good, task.test.good, task.sign-off.good]
- name: Final Task
type: exec # execute a command
listen: merge.signed.good
opts:
cmd: "ls" # the command to execute
- name: complete
listen: task.final-task.good
type: end # getting here means the flow was a success 'end' is the special definitive end event
- id: danmux
ver: 1
triggers:
- name: start
type: data
opts:
url: [email protected]:danmux/danmux-hugo.git
form:
title: Start
fields:
- id: branch
prompt: Branch
type: text
- name: Every 5 Minutes
type: timer # fires every period seconds
opts:
period: 300 # how often to fire in seconds
url: [email protected]:danmux/danmux-hugo.git
branch: master
- name: Commits
type: poll-git
opts:
period: 10 # check every 10 seconds
url: [email protected]:danmux/danmux-hugo.git # the repo to check
refs: "refs/heads/*" # the refs pattern to match
exclude-refs: "refs/heads/master"
flow-file: floe.yml # get the actual flow from this file