-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
79 lines (76 loc) · 2.44 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!groovy
def sendNotification(prefix, recipientList) {
def commit = [sh(script: "git log --max-count=1 --pretty=oneline --abbrev-commit", returnStdout: true).trim()]
def show = sh(script: "git show -1", returnStdout: true).trim()
def results = sh(script: "cat ARTIFACTS/*_result.txt", returnStdout: true).trim()
emailext (
to: "${recipientList}",
subject: "${prefix}${currentBuild.fullDisplayName} - ${commit}",
body: "Wall of text at ${env.BUILD_URL}consoleFull\n\n"+
"On tree ${env.GIT_URL}\n"+
"On branch ${env.GIT_BRANCH}\n"+
"Using commit ${env.GIT_COMMIT}\n"+
"Using builder ${env.NODE_NAME}\n\n"+
"${results}\n\n"+
"${show}\n",
)
}
pipeline {
agent {
label 'vagrant'
}
options {
timeout(time: 70, unit: 'MINUTES')
}
stages {
stage ('Bootstrap kernel') {
environment {
VM_MEMORY = '4096'
VM_CPUS = '4'
}
steps {
sh 'git clone https://github.com/cilium/bpf-ci-scripts workspace || true'
sh 'git -C workspace checkout . || true'
sh 'git -C workspace pull origin master || true'
sh 'cp workspace/`uname -m`/Vagrantfile Vagrantfile'
sh 'vagrant plugin install vagrant-reload'
sh 'vagrant plugin install vagrant-scp'
sh 'vagrant up'
}
}
stage ('LLVM nightly') {
steps {
sh 'vagrant ssh -c "workspace/workspace/scripts/3_get_llvm_snapshot.sh"'
}
}
stage ('Cilium tests (skipped)') {
steps {
sh 'vagrant ssh -c "workspace/workspace/scripts/4_run_integration.sh" || true'
}
}
stage ('Install bpftool') {
steps {
sh 'vagrant ssh -c "workspace/workspace/scripts/5_install_bpftool.sh ~/workspace"'
}
}
stage ('BPF selftest') {
steps {
sh 'vagrant ssh -c "workspace/workspace/scripts/5_run_selftest.sh ~/workspace"'
//step([$class: "TapPublisher", testResults: "*_result.txt"])
}
}
}
post {
always {
sh './workspace/scripts/6_artifacts.sh'
sh './workspace/scripts/6_cleanup.sh'
archiveArtifacts artifacts: 'ARTIFACTS/**', fingerprint: true, allowEmptyArchive: true
}
failure {
sendNotification("Build failure: ", "[email protected]")
}
success {
sendNotification("Build success: ", "[email protected]")
}
}
}