forked from florianklingler/OpenC2X-embedded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
57 lines (50 loc) · 1.05 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
def axisTargets = ["x86_64","x86_geode","ar71xx_generic"]
def checkout_tasks = [:]
def build_tasks = [:]
def archive_tasks = [:]
for(int i=0; i< axisTargets.size(); i++) {
def target = axisTargets[i]
def targets_split = target.tokenize( '_' )
def maintarget = targets_split[0]
def subtarget = targets_split[1]
checkout_tasks["${target}"] = {
node {
ws("${env.JOB_NAME}-${target}") {
dir('firmware') {
checkout scm
}
}
}
}
build_tasks["${target}"] = {
node {
ws("${env.JOB_NAME}-${target}") {
dir('firmware') {
sh "./scripts/feeds update -a"
sh "./scripts/feeds install -a"
sh "./create_config.sh ${target}"
sh "make defconfig"
sh "make -j2 V=s"
}
}
}
}
archive_tasks["${target}"] = {
node {
ws("${env.JOB_NAME}-${target}") {
dir('firmware') {
archiveArtifacts artifacts: 'bin/targets/*/*/*', excludes: ''
}
}
}
}
}
stage('Checkout') {
parallel checkout_tasks
}
stage ("Build") {
parallel build_tasks
}
stage ("Archive") {
parallel archive_tasks
}