-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathJenkinsfile
53 lines (48 loc) · 1.3 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env groovy
/* SPDX-License-Identifier: MIT-0 */
if (env.BRANCH_NAME == 'main') {
def triggers = []
triggers << cron('H H(7-8) * * *')
properties ([
pipelineTriggers(triggers)
])
}
def examples = ['drake_bazel_external', 'drake_bazel_external_legacy', 'drake_cmake_external']
def jobs = [:]
for (example in examples) {
def name = example
jobs[name] = {
node('linux-jammy-unprovisioned') {
timeout(600) {
ansiColor('xterm') {
try {
dir('src') {
stage('checkout') {
checkout scm
}
}
dir('src/' + name) {
stage(name + ' setup') {
sh '.github/setup'
}
stage(name + ' build and test') {
sh '.github/ci_build_test'
}
}
} catch (e) {
if (env.BRANCH_NAME == 'main') {
emailext (
subject: "Build failed in Jenkins: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: "See <${env.BUILD_URL}display/redirect?page=changes>",
recipientProviders: [[$class: 'DevelopersRecipientProvider']],
to: '$DEFAULT_RECIPIENTS',
)
}
throw e
}
}
}
}
}
}
parallel jobs