-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan.yaml
155 lines (138 loc) · 4.34 KB
/
plan.yaml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#""""""""""""""""""""""""""""""
# = example sweetpotato build script =
#...
sweetpotato:
example:
- echo: this is an example target
- require: settokens
- echo: tokens are go
- echo: "sweetpotato will count from 0 to {{countto}} -1"
- do: {"target": echocount, "range":"{{countto}}", "settoken":iteration}
- echo: sweetpotato makes counting easy!
- db:
type: sweetpotato
path: build.yaml
read:
root: somedata
target: echomood
do:
- echo: I am a nested echo task nested in-line inside a do task!
- echo: this part has mutex
- fields:
name: personName
mood: personMood
settokens:
- token:
countto: 5
echocount:
- echo: "{{iteration}}"
echomood:
- echo: "{{personName}} is feeling {{personMood}}"
#"""""""""""""""""""""""""""""""
# = targets for lock tests =
# i.e. `sp longerrun & sleep 3; sp sayhello; sp longrun`
# in the above example sayhello should finish first, then longerrun, then longrun
#...
longrun:
- lock:
key: locktest
do:
- do: {"target": donothing, "range": 1000, "settoken":iteration}
- echo: done longrun
longerrun:
- lock:
key: locktest
do:
- do: {"target": donothing, "range": 100000, "settoken":iteration}
- echo: done longerrun
sayhello:
- echo: why, hello there!
donothing:
#""""""""""""""""""""""""""""""
# = targets for workfile tests =
#...
buildsh:
workfile:
path: my.sh
backup: save
lock:
- write: "#/!bin/sh"
- write: echo "hello world!"
#""""""""""""""""""""""""""""""
# = targets for xhtml tests =
#...
publish:
- token:
wikiUrl: "http://localhost/mywiki"
buildDir: "/tmp/build"
- do:
target: publishfromwiki
publishfromwiki:
- db:
type: moincategory
url: "{{wikiUrl}}/CategoryPublish"
read:
target: parsepage
fields:
title: pageTitle
url: pageUrl
name: pageName
parsepage:
- extension:
name: www
from: [sweetpotato,extensions]
- www:
url: "{{pageUrl}}"
select:
pageContent: "#content"
- www:
url: "{{wikiUrl}}/SideBar"
select:
sidebarContent: "#content"
- do:
target: buildpage
buildpage:
- extension:
name: xhtml
from: [sweetpotato,extensions]
- lock:
- workfile:
path: "{{buildDir}}/{{pageName}}.html"
overwrite: True
xhtml:
- head:
- title: "{{pageTitle}}"
- body:
- div:
id: main
do:
- div:
id: content
table:
- tr:
- td:
value: "{{pageContent}}"
- div:
id: sidebar
value: "{{sidebarContent}}"
- div:
id: header
do:
- p: "my site"
- div:
id: footer
do:
- p: "{{pageUrl}}"
#""""""""""""""""""""""""""""""
# = Inline Data =
#...
somedata:
- {"name":bob, "mood":happy}
- {"name":ann, "mood":silly}
- {"name":joe, "mood":sleepy}
- {"name":tom, "mood":angry}
- {"name":sue, "mood":mopey}
- {"name":tim, "mood":curious}
- {"name":ken, "mood":amorous}
- {"name":don, "mood":coy}
- {"name":mel, "mood":scared}