Matteo Scandolo | 42f6e57 | 2021-01-25 15:11:34 -0800 | [diff] [blame] | 1 | def call(String project) { |
| 2 | // project is the gerrit project name |
| 3 | |
Matteo Scandolo | 231e2da | 2021-02-10 14:16:30 -0800 | [diff] [blame] | 4 | // 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 Scandolo | 42f6e57 | 2021-01-25 15:11:34 -0800 | [diff] [blame] | 23 | |
| 24 | sh """ |
Matteo Scandolo | 231e2da | 2021-02-10 14:16:30 -0800 | [diff] [blame] | 25 | make -C $WORKSPACE/${project} DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest ${makeTarget} |
Matteo Scandolo | 42f6e57 | 2021-01-25 15:11:34 -0800 | [diff] [blame] | 26 | """ |
| 27 | } else { |
| 28 | println "The project ${project} does not require to be built." |
| 29 | } |
| 30 | |
| 31 | } |