-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-board.jenkinsfile
55 lines (53 loc) · 1.9 KB
/
build-board.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
pipeline {
agent {
label {
label 'build-node'
customWorkspace "workspace/results/build"
}
}
parameters {
string (
defaultValue: 'unkown',
description: 'RIOT version identifier default \'unknown\'',
name: 'RIOT_VERSION',
trim: true
)
string (
defaultValue: 'nucleo-l152re',
description: 'List of boards to test',
name: 'BOARD',
trim: true
)
string (
defaultValue: ' --with-test-only --incremental',
description: '''args for compile_and_test_for_board script''',
name: 'COMPILE_AND_TEST_ARGS'
)
string (
defaultValue: '',
description: '''environment vars for compile_and_test_for_board script
To pass USEMODULE and CFLAGS use:
DOCKER_ENVIRONMENT_CMDLINE=\'-e USEMODULE=<name>\'
DOCKER_ENVIRONMENT_CMDLINE=\'-e CFLAGS=-D<flag>\'''',
name: 'COMPILE_AND_TEST_VARS'
)
}
stages {
stage('build') {
steps {
script {
currentBuild.displayName = "${currentBuild.number}-${params.BOARD}-${params.RIOT_VERSION}"
}
lock(resource: "${params.BOARD}" as String, skipIfLocked: true) {
sh label: '', script: """
PROGRAMMER_QUIET=0
RIOT_TOOL=/builds/boards/RIOT
RIOTBASE=/builds/workspace/RIOT.git.jk/
COMPILE_AND_TEST=\${RIOT_TOOL}/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
${COMPILE_AND_TEST_VARS} BUILD_IN_DOCKER=1 \${COMPILE_AND_TEST} \${RIOTBASE} ${BOARD} . ${COMPILE_AND_TEST_ARGS}
"""
}
}
}
}
}