blob: 29c9b9c3531dd5db6f10447564cba879649c0bb3 [file] [log] [blame]
Matteo Scandolo42f6e572021-01-25 15:11:34 -08001def call(String project) {
2 // project is the gerrit project name
3
Matteo Scandolo231e2da2021-02-10 14:16:30 -08004 // these are project that are not required to be built
5 def ignoredProjects = [
6 '', // this is the case for a manual trigger on master, nothing to be built
7 'voltha-system-tests',
8 'voltha-helm-charts'
9 ]
10
11 // some projects have different make targets
12 def Map customMakeTargets = [
13 "voltctl": "release"
14 ]
15
16 def defaultMakeTarget = "docker-build"
17
18 if (!ignoredProjects.contains(project)) {
19
20 def makeTarget = customMakeTargets.get(project, defaultMakeTarget)
21
22 println "Building ${project} with make target ${makeTarget}."
Matteo Scandolo42f6e572021-01-25 15:11:34 -080023
24 sh """
Matteo Scandolo231e2da2021-02-10 14:16:30 -080025 make -C $WORKSPACE/${project} DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest ${makeTarget}
Matteo Scandolo42f6e572021-01-25 15:11:34 -080026 """
27 } else {
28 println "The project ${project} does not require to be built."
29 }
30
31}