-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGettingStarted.kt
48 lines (40 loc) · 969 Bytes
/
GettingStarted.kt
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
import kinds.tekton.dev.v1beta1.task
import kinds.tekton.dev.v1beta1.taskRun
/**
* Shows how the examples on the getting started page map when defined using the KubeRig DSL.
*
* https://tekton.dev/docs/getting-started/
*/
class GettingStarted {
fun aTask() {
task {
metadata {
name("hello")
}
spec {
steps {
step {
name("hello")
image("ubuntu")
command("echo")
args {
arg("'Hello World!'")
}
}
}
}
}
}
fun aTaskRun() {
taskRun {
metadata {
generateName("hello-run-")
}
spec {
taskRef {
name("hello")
}
}
}
}
}