blob: b0f12e9c0f74de0f27071730afd89fa500d9171e [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
110 goals: 'clean deploy'
Zack Williamsc3c83932018-10-30 13:56:37 -0700111
112- job-template:
113 id: maven-test
114 name: 'verify_{project}_maven-test'
115 description: |
116 <!-- Managed by Jenkins Job Builder -->
117 Created by {id} job-template from ci-management/jjb/maven.yaml
118
119 triggers:
120 - cord-infra-gerrit-trigger-patchset:
121 gerrit-server-name: '{gerrit-server-name}'
122 project-regexp: '{project}'
123 branch-regexp: '{branch-regexp}'
124 file-include-regexp: '{all-files-regexp}'
125 dependency-jobs: '{dependency-jobs}'
126
127 properties:
128 - cord-infra-properties:
129 build-days-to-keep: '{build-days-to-keep}'
130 artifact-num-to-keep: '{artifact-num-to-keep}'
131
132
133 wrappers:
134 - lf-infra-wrappers:
135 build-timeout: 30
136 jenkins-ssh-credential: '{jenkins-ssh-credential}'
137
138 scm:
139 - lf-infra-gerrit-scm:
140 git-url: '$GIT_URL/$GERRIT_PROJECT'
141 refspec: '$GERRIT_REFSPEC'
142 branch: '$GERRIT_BRANCH'
143 submodule-recursive: 'false'
144 choosing-strategy: gerrit
145 jenkins-ssh-credential: '{jenkins-ssh-credential}'
146
147 node: 'ubuntu16.04-basebuild-1c-2g'
148 project-type: maven
149 concurrent: true
150
Matteo Scandolo00240382018-11-26 14:42:32 -0800151 builders:
152 # NOTE: this env var is only required to fix a bug in the "surefire" dependency:
153 # https://issues.apache.org/jira/browse/SUREFIRE-1588
154 # https://github.com/apache/maven-surefire/pull/197
155 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
156 # should be removed as soon as this problem is resolved
157 - inject:
158 properties-content: |
159 _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
160 - maven-target:
161 pom: pom.xml
162 goals: 'test'