blob: 522c107a50bb8ae4fd7be9e70eba4c58d782e6c7 [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
Matteo Scandolo23cde382019-05-22 17:00:43 -070060- job-template:
61 id: maven-deploy
62 name: '{project}-gerrit-deploy'
63 description: |
64 <!-- Managed by Jenkins Job Builder -->
65 Created by {id} job-template from ci-management/jjb/maven.yaml
66
67 node: 'ubuntu16.04-basebuild-1c-2g'
68 project-type: freestyle
69
70 parameters:
71 - string:
72 name: GERRIT_BRANCH
73 default: 'master'
74 description: 'Use default when using "Build Now"'
75
76 - string:
77 name: GERRIT_REFSPEC
78 default: 'refs/heads/master'
79 description: 'Use default when using "Build Now"'
80
81 triggers:
82 - cord-infra-gerrit-trigger-merge:
83 gerrit-server-name: '{gerrit-server-name}'
84 project-regexp: '{project}'
85 branch-regexp: '{branch-regexp}'
86 file-include-regexp: '{all-files-regexp}'
87 dependency-jobs: '{dependency-jobs}'
88
89 properties:
90 - cord-infra-properties:
91 build-days-to-keep: '{build-days-to-keep}'
92 artifact-num-to-keep: '{artifact-num-to-keep}'
93
94 scm:
95 - git:
96 url: '{gerrit-server-url}/{project}'
97 branches:
98 - '$GERRIT_BRANCH'
99 refspec: '$GERRIT_REFSPEC'
100 choosing-strategy: 'gerrit'
101 shallow-clone: true
102
103 builders:
104 - inject:
105 properties-content: |
106 _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
107 - maven-target:
108 pom: pom.xml
109 settings: onoscord-apps
Matteo Scandoloe7ee33c2019-05-23 13:23:13 -0700110 settings-type: cfp
Matteo Scandolo23cde382019-05-22 17:00:43 -0700111 goals: 'clean deploy'
Zack Williamsc3c83932018-10-30 13:56:37 -0700112
113- job-template:
114 id: maven-test
115 name: 'verify_{project}_maven-test'
116 description: |
117 <!-- Managed by Jenkins Job Builder -->
118 Created by {id} job-template from ci-management/jjb/maven.yaml
119
120 triggers:
121 - cord-infra-gerrit-trigger-patchset:
122 gerrit-server-name: '{gerrit-server-name}'
123 project-regexp: '{project}'
124 branch-regexp: '{branch-regexp}'
125 file-include-regexp: '{all-files-regexp}'
126 dependency-jobs: '{dependency-jobs}'
127
128 properties:
129 - cord-infra-properties:
130 build-days-to-keep: '{build-days-to-keep}'
131 artifact-num-to-keep: '{artifact-num-to-keep}'
132
133
134 wrappers:
135 - lf-infra-wrappers:
136 build-timeout: 30
137 jenkins-ssh-credential: '{jenkins-ssh-credential}'
138
139 scm:
140 - lf-infra-gerrit-scm:
141 git-url: '$GIT_URL/$GERRIT_PROJECT'
142 refspec: '$GERRIT_REFSPEC'
143 branch: '$GERRIT_BRANCH'
144 submodule-recursive: 'false'
145 choosing-strategy: gerrit
146 jenkins-ssh-credential: '{jenkins-ssh-credential}'
147
148 node: 'ubuntu16.04-basebuild-1c-2g'
149 project-type: maven
150 concurrent: true
151
Matteo Scandolo00240382018-11-26 14:42:32 -0800152 builders:
153 # NOTE: this env var is only required to fix a bug in the "surefire" dependency:
154 # https://issues.apache.org/jira/browse/SUREFIRE-1588
155 # https://github.com/apache/maven-surefire/pull/197
156 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
157 # should be removed as soon as this problem is resolved
158 - inject:
159 properties-content: |
160 _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
161 - maven-target:
162 pom: pom.xml
163 goals: 'test'