forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (35 loc) · 897 Bytes
/
Jenkinsfile
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
node {
stage ('Build') {
node ('linux-build') {
checkout scm
sh './scripts/jenkins_build.sh'
sh './scripts/jenkins_archive.sh'
deleteDir()
}
}
stage ('Performance Test') {
def platforms = ['perf-ubuntu-a0', 'perf-ubuntu-ds1']
def perftests = [:]
for (int i = 0; i < platforms.size(); i++) {
platform = platforms.get(i)
perftests["Test ${platform}"] = perf_closure(platform)
}
perftests.failFast = false
parallel perftests
}
}
def perf_closure(platform) {
return {
node (platform) {
if (env.BRANCH_NAME != null && (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('performance'))) {
checkout scm
echo "Running performance test on ${platform}."
sh './scripts/jenkins_perf.sh'
deleteDir()
}
else {
echo "Skip performance test."
}
}
}
}