Commit

Author:

Hash:

Timestamp:

+63 -0 +/-3 browse

Kevin Schoon [me@kevinschoon.com]

1827f11766063e18c3235f921790311313a8a25e

Tue, 07 Jul 2026 10:04:08 +0000 (1 week ago)

add a few ayllu-build examples
1diff --git a/ayllu-build/examples/big.jsonnet b/ayllu-build/examples/big.jsonnet
2new file mode 100644
3index 0000000..5207912
4--- /dev/null
5+++ b/ayllu-build/examples/big.jsonnet
6 @@ -0,0 +1,21 @@
7+ local iterations = 10;
8+ local output_size = "5M" ;
9+
10+ {
11+ workflows: [
12+ {
13+ name: 'workflow-%d' % j,
14+ image: 'ayllu-arch',
15+ steps: [
16+ { name: 'step-%d' % i, input: 'dd if=/dev/zero of=output-%d.bin bs=1M count=5 status=progress' % i }
17+ for i in std.range(1, iterations)
18+ ],
19+ outputs: [
20+ {
21+ path: 'output-%d.bin' % n,
22+ } for n in std.range(1, iterations)
23+ ]
24+ }
25+ for j in std.range(1, iterations)
26+ ],
27+ }
28 diff --git a/ayllu-build/examples/greeting.jsonnet b/ayllu-build/examples/greeting.jsonnet
29new file mode 100644
30index 0000000..7bd906e
31--- /dev/null
32+++ b/ayllu-build/examples/greeting.jsonnet
33 @@ -0,0 +1,27 @@
34+ local greetings = [
35+ ['IT', 'buongiorno'],
36+ ['PT', 'bom dia'],
37+ ['ES', 'buen día'],
38+ ];
39+
40+ local say(greeting) = {
41+ name: 'Greeting: ' + greeting[0],
42+ input: std.join(' ', ['echo', greeting[1], '| cat >>', greeting[0] + '.txt']),
43+ };
44+
45+ {
46+ workflows: [
47+ {
48+ name: 'Greetings',
49+ image: 'alpine',
50+ steps: [
51+ say(greeting)
52+ for greeting in greetings
53+ ],
54+ outputs: [
55+ (function(greeting) { path: greeting[0] + '.txt' })(greeting)
56+ for greeting in greetings
57+ ],
58+ },
59+ ],
60+ }
61 diff --git a/ayllu-build/examples/sleep.jsonnet b/ayllu-build/examples/sleep.jsonnet
62new file mode 100644
63index 0000000..7953070
64--- /dev/null
65+++ b/ayllu-build/examples/sleep.jsonnet
66 @@ -0,0 +1,15 @@
67+ {
68+ workflows: [
69+ {
70+ name: 'sleep',
71+ image: 'ayllu-arch',
72+
73+ steps: [
74+ {
75+ name: 'sleep',
76+ input: 'sleep 100000',
77+ },
78+ ],
79+ },
80+ ],
81+ }