blob: 00fa36fd211122408eee85e73748a8724a390ff1 [file] [log] [blame]
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -07001---
Zack Williamsc3c83932018-10-30 13:56:37 -07002# maven jobs for Java projects
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -07003
4- job-template:
Kailash Khalasi45f4e2c2018-05-09 14:09:50 -07005 id: maven-install
6 name: '{project}-gerrit'
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -07007 description: |
8 <!-- Managed by Jenkins Job Builder -->
Kailash Khalasi45f4e2c2018-05-09 14:09:50 -07009 Created by {id} job-template from ci-management/jjb/maven.yaml
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -070010
11 node: 'ubuntu16.04-basebuild-1c-2g'
Matteo Scandolo00240382018-11-26 14:42:32 -080012 project-type: freestyle
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -070013
Kailash Khalasif3f15bd2018-05-09 09:58:52 -070014 parameters:
15 - string:
Kailash Khalasia5ca0c72018-05-09 12:00:21 -070016 name: GERRIT_BRANCH
17 default: 'master'
Kailash Khalasif3f15bd2018-05-09 09:58:52 -070018 description: 'Use default when using "Build Now"'
19
20 - string:
Kailash Khalasia5ca0c72018-05-09 12:00:21 -070021 name: GERRIT_REFSPEC
22 default: 'refs/heads/master'
Kailash Khalasif3f15bd2018-05-09 09:58:52 -070023 description: 'Use default when using "Build Now"'
24
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -070025 triggers:
26 - cord-infra-gerrit-trigger-patchset:
27 gerrit-server-name: '{gerrit-server-name}'
Kailash Khalasi45f4e2c2018-05-09 14:09:50 -070028 project-regexp: '{project}'
Kailash Khalasi69c8fcd2018-05-09 09:43:49 -070029 branch-regexp: '{branch-regexp}'
30 file-include-regexp: '{all-files-regexp}'
31 dependency-jobs: '{dependency-jobs}'
32
33 properties:
34 - cord-infra-properties:
35 build-days-to-keep: '{build-days-to-keep}'
36 artifact-num-to-keep: '{artifact-num-to-keep}'
Kailash Khalasia5ca0c72018-05-09 12:00:21 -070037
38 scm:
39 - git:
Kailash Khalasi45f4e2c2018-05-09 14:09:50 -070040 url: '{gerrit-server-url}/{project}'
Kailash Khalasi1b3d3fe2018-05-09 13:20:22 -070041 branches:
42 - '$GERRIT_BRANCH'
Kailash Khalasi45f4e2c2018-05-09 14:09:50 -070043 refspec: '$GERRIT_REFSPEC'
Kailash Khalasia5ca0c72018-05-09 12:00:21 -070044 choosing-strategy: 'gerrit'
Kailash Khalasia5ca0c72018-05-09 12:00:21 -070045 shallow-clone: true
Zack Williamsc3c83932018-10-30 13:56:37 -070046
Matteo Scandolo00240382018-11-26 14:42:32 -080047 builders:
48 # NOTE: this env var is only required to fix a bug in the "surefire" dependency:
49 # https://issues.apache.org/jira/browse/SUREFIRE-1588
50 # https://github.com/apache/maven-surefire/pull/197
51 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
52 # should be removed as soon as this problem is resolved
53 - inject:
54 properties-content: |
55 _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
56 - maven-target:
57 pom: pom.xml
58 goals: 'clean install'
59
Zack Williamsc3c83932018-10-30 13:56:37 -070060
61- job-template:
62 id: maven-test
63 name: 'verify_{project}_maven-test'
64 description: |
65 <!-- Managed by Jenkins Job Builder -->
66 Created by {id} job-template from ci-management/jjb/maven.yaml
67
68 triggers:
69 - cord-infra-gerrit-trigger-patchset:
70 gerrit-server-name: '{gerrit-server-name}'
71 project-regexp: '{project}'
72 branch-regexp: '{branch-regexp}'
73 file-include-regexp: '{all-files-regexp}'
74 dependency-jobs: '{dependency-jobs}'
75
76 properties:
77 - cord-infra-properties:
78 build-days-to-keep: '{build-days-to-keep}'
79 artifact-num-to-keep: '{artifact-num-to-keep}'
80
81
82 wrappers:
83 - lf-infra-wrappers:
84 build-timeout: 30
85 jenkins-ssh-credential: '{jenkins-ssh-credential}'
86
87 scm:
88 - lf-infra-gerrit-scm:
89 git-url: '$GIT_URL/$GERRIT_PROJECT'
90 refspec: '$GERRIT_REFSPEC'
91 branch: '$GERRIT_BRANCH'
92 submodule-recursive: 'false'
93 choosing-strategy: gerrit
94 jenkins-ssh-credential: '{jenkins-ssh-credential}'
95
96 node: 'ubuntu16.04-basebuild-1c-2g'
97 project-type: maven
98 concurrent: true
99
Matteo Scandolo00240382018-11-26 14:42:32 -0800100 builders:
101 # NOTE: this env var is only required to fix a bug in the "surefire" dependency:
102 # https://issues.apache.org/jira/browse/SUREFIRE-1588
103 # https://github.com/apache/maven-surefire/pull/197
104 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
105 # should be removed as soon as this problem is resolved
106 - inject:
107 properties-content: |
108 _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
109 - maven-target:
110 pom: pom.xml
111 goals: 'test'