forked from svanoort/pipeline-testcases
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathos-dependent-benchmark-base.groovy
More file actions
56 lines (53 loc) · 1.65 KB
/
os-dependent-benchmark-base.groovy
File metadata and controls
56 lines (53 loc) · 1.65 KB
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
timestamps {
node {
if (isUnix()) {
echo "--> UNIX-y system deteted."
for (int i=0; i<15; i++) {
stage ("Unix Looping Stages $i") {
echo "My stage number is $i"
node {
sh 'vmstat || exit 1'
}
}
}
stage ('Unix shell script') {
node {
sh 'vmstat'
}
}
stage ('Label-based') {
node {
stage ('Things using node') {
for (int i=0; i<20; i++) {
echo "We have done this $i times."
}
}
}
}
} // end isUnix block
else { // Must be Windows.
echo "--> Windows system detected."
for (int i=0; i<15; i++) {
stage ("Windows Looping Stages $i") {
echo "My stage number is $i"
node {
echo "dir on windows directory"
bat 'dir C:\\windows'
}
}
}
stage ('Windows shell script') {
node {
bat 'dir'
}
}
stage ('Label-based') {
node {
for (int i=0; i<20; i++) {
echo "We have done this $i times."
}
}
}
} // ends our windows stuff
} // ends node
} // end timestamps