forked from murtaza64/tree-sitter-groovy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_pipeline
50 lines (46 loc) · 1020 Bytes
/
test_pipeline
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
package test
import groovy.transform.*
def key = val
String str
int y = 57
/**
* groovydoc example
* @param x
* @throws Exception
* hello world
*/
def f(int x) {
return 1 + x + y // highlight parameters
}
g = { x -> x * 2 } // closure
@annotation /* annotation */
static class C {
public static int x = 1
}
pipeline {
stages {
stage("jenkins pipeline") {
steps {
sh "hello world ${with_interpolation}"
sh """\n \t \u1234 escape sequences
${multiline.string} with interpolation """
sh '''${multiline.string} without interpolation\t
'''
sh(/slashy string/)
sh($/dollar slashy string/$)
checkout([repo_name: "hello world", clone_depth: 20])
mapFunc(param1: val, param2: 4)
sendTrackingEvents(arg1, 3 + 4 * 7, false)
script {
switch (x) {
case 1:
println("1")
break
default:
println("default")
}
}
}
}
}
}