forked from 3devo/ChildbusBootloader
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
57 lines (51 loc) · 1.46 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
pipeline {
agent {
dockerfile true
}
stages {
stage("Prepare") {
steps {
sh 'git submodule update --init'
script {
def commit_nr = sh(script: 'git rev-list HEAD --count', returnStdout: true).trim()
def prefix
if (env.CHANGE_ID) {
// This is a PR build
prefix = "PR${env.CHANGE_ID}-"
} else if (env.BRANCH_NAME == "master") {
prefix = ""
} else {
// This is build of an ordinary branch (not a release branch)
prefix = env.BRANCH_NAME.replaceAll("_", "-")
}
env.BL_VERSION = "${commit_nr}"
env.BL_VERSION_PREFIX = prefix
}
}
}
stage("Build libopencm3") {
steps {
sh 'make -C libopencm3 lib/stm32/g0'
}
}
stage("Build Dwarf") {
steps {
sh "make dwarf"
}
}
stage("Build Modular Bed") {
steps {
sh "make modularbed"
}
}
}
post {
always {
// archive build products
archiveArtifacts artifacts: 'bootloader-*', fingerprint: true
}
cleanup {
deleteDir()
}
}
}