8 name: lf-infra-tox-install
11 properties-content: 'PYTHON_VERSION={python-version}'
12 - shell: !include-raw-escape: ../shell/tox-install.sh
15 name: lf-infra-clm-python
18 properties-content: 'CLM_PROJECT_NAME={clm-project-name}'
19 - shell: !include-raw-escape:
20 - ../shell/nexus-iq-cli.sh
26 - lf_python_common: &lf_python_common
27 name: lf-python-common
29 ######################
30 # Default parameters #
31 ######################
40 project-type: freestyle
44 - lf-infra-properties:
45 build-days-to-keep: '{build-days-to-keep}'
48 - lf-infra-parameters:
52 lftools-version: '{lftools-version}'
56 build-timeout: '{build-timeout}'
57 jenkins-ssh-credential: '{jenkins-ssh-credential}'
66 - lf_python_clm_xc: &lf_python_xc_clm
67 name: lf-python-xc-clm
69 ######################
70 # Default parameters #
71 ######################
74 build-days-to-keep: 30 # 30 days for troubleshooting purposes
77 git-url: '$GIT_URL/$PROJECT'
78 github-url: 'https://github.com'
79 java-version: openjdk8
80 nexus-iq-cli-version: 1.44.0-01
82 submodule-recursive: true
84 gerrit_trigger_file_paths:
88 # github_included_regions MUST match gerrit_trigger_file_paths
89 github_included_regions:
96 disabled: '{disable-job}'
99 - lf-infra-parameters:
103 lftools-version: '{lftools-version}'
105 name: NEXUS_IQ_CLI_VERSION
106 default: '{nexus-iq-cli-version}'
107 description: Nexus IQ CLI package to download and use.
110 - credentials-binding:
111 - username-password-separated:
112 credential-id: nexus-iq-xc-clm
114 password: CLM_PASSWORD
116 - lf-update-java-alternatives:
117 java-version: '{java-version}'
118 - lf-infra-clm-python:
119 clm-project-name: '{project-name}'
122 name: '{project-name}-python-clm-{stream}'
123 id: gerrit-python-xc-clm
124 <<: *lf_python_common
125 # yamllint disable-line rule:key-duplicates
126 <<: *lf_python_xc_clm
128 ######################
129 # Default parameters #
130 ######################
133 - comment-added-contains-event:
134 comment-contains-value: run-clm$
136 #####################
137 # Job Configuration #
138 #####################
141 - lf-infra-gerrit-scm:
142 jenkins-ssh-credential: '{jenkins-ssh-credential}'
144 refspec: '$GERRIT_REFSPEC'
145 branch: '$GERRIT_BRANCH'
146 submodule-recursive: '{submodule-recursive}'
147 choosing-strategy: default
150 # Build weekly on Saturdays
153 server-name: '{gerrit-server-name}'
154 trigger-on: '{obj:gerrit_clm_triggers}'
156 - project-compare-type: ANT
157 project-pattern: '{project}'
159 - branch-compare-type: ANT
160 branch-pattern: '**/{branch}'
161 file-paths: '{obj:gerrit_trigger_file_paths}'
169 name: '{project-name}-python-clm-{stream}'
170 id: github-python-xc-clm
171 <<: *lf_python_common
172 # yamllint disable-line rule:key-duplicates
173 <<: *lf_python_xc_clm
176 - lf-infra-properties:
177 build-days-to-keep: '{build-days-to-keep}'
179 url: '{github-url}/{github-org}/{project}'
182 - lf-infra-github-scm:
183 url: '{git-clone-url}{github-org}/{project}'
185 branch: 'refs/heads/{branch}'
186 submodule-recursive: '{submodule-recursive}'
187 choosing-strategy: default
188 jenkins-ssh-credential: '{jenkins-ssh-credential}'
191 # Build weekly on Saturdays
193 - github-pull-request:
194 trigger-phrase: '^run-clm$'
195 only-trigger-phrase: false
196 status-context: 'CLM'
199 white-list-target-branches:
201 included-regions: '{obj:github_included_regions}'
203 ########################
204 # Python Sonar with Tox #
205 ########################
207 - lf_tox_sonar: &lf_tox_sonar
210 ######################
211 # Default parameters #
212 ######################
214 branch: master # Sonar should always be run on master branch
215 build-days-to-keep: 7
217 cron: 'H H * * *' # run daily
219 git-url: '$GIT_URL/$PROJECT'
220 github-url: 'https://github.com'
221 java-version: openjdk8
222 python-version: python2
223 mvn-global-settings: global-settings
224 mvn-settings: '{mvn-settings}'
226 sonar-mvn-goal: 'sonar:sonar'
228 submodule-recursive: true
230 gerrit_trigger_file_paths:
231 - compare-type: REG_EXP
234 # github_included_regions MUST match gerrit_trigger_file_paths
235 github_included_regions:
238 #####################
239 # Job Configuration #
240 #####################
242 disabled: '{disable-job}'
245 - lf-infra-parameters:
249 lftools-version: '{lftools-version}'
251 name: ARCHIVE_ARTIFACTS
252 default: '{archive-artifacts}'
253 description: Artifacts to archive to the logs server.
256 # Sets an env var for shell scripts to be able to call the dynamically
257 # installed maven without having to calculate the path themselves.
258 # yamllint disable-line rule:line-length
259 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
260 description: 'Maven selector to be used by shell scripts'
262 name: SONAR_MAVEN_GOAL
263 default: '{sonar-mvn-goal}'
265 Maven goals to pass to the Sonar call. Typically sonar:sonar
266 however to use a specific version of the sonar-maven-plugin we
267 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
271 - lf-infra-tox-install:
272 python-version: '{python-version}'
273 - shell: !include-raw-escape: ../shell/tox-run.sh
274 - lf-provide-maven-settings:
275 global-settings-file: '{mvn-global-settings}'
276 settings-file: '{mvn-settings}'
277 - lf-infra-tox-sonar:
278 java-version: '{java-version}'
279 mvn-settings: '{mvn-settings}'
280 mvn-version: '{mvn-version}'
286 name: lf-infra-tox-sonar
287 # Run a Sonar build with Maven
290 mvn-version: '{mvn-version}'
291 - lf-update-java-alternatives:
292 java-version: '{java-version}'
294 # TODO: Switch this to the sonar wrapper when JJB 2.0 is available
295 properties-content: SONAR_HOST_URL=$SONAR_URL
296 - shell: !include-raw-escape:
297 - ../shell/common-variables.sh
298 - ../shell/maven-sonar.sh
299 - lf-provide-maven-settings-cleanup
302 name: '{project-name}-tox-sonar'
304 <<: *lf_python_common
305 # yamllint disable-line rule:key-duplicates
308 ######################
309 # Default parameters #
310 ######################
312 gerrit_sonar_triggers:
313 - comment-added-contains-event:
314 comment-contains-value: run-sonar$
316 #####################
317 # Job Configuration #
318 #####################
321 - lf-infra-gerrit-scm:
322 jenkins-ssh-credential: '{jenkins-ssh-credential}'
324 refspec: $GERRIT_REFSPEC
325 branch: $GERRIT_BRANCH
326 submodule-recursive: '{submodule-recursive}'
327 choosing-strategy: default
330 - timed: '{obj:cron}'
332 server-name: '{gerrit-server-name}'
333 trigger-on: '{obj:gerrit_sonar_triggers}'
335 - project-compare-type: 'ANT'
336 project-pattern: '{project}'
338 - branch-compare-type: 'ANT'
339 branch-pattern: '**/{branch}'
340 file-paths: '{obj:gerrit_trigger_file_paths}'
348 name: '{project-name}-tox-sonar'
350 <<: *lf_python_common
351 # yamllint disable-line rule:key-duplicates
355 - lf-infra-properties:
356 build-days-to-keep: '{build-days-to-keep}'
358 url: '{github-url}/{github-org}/{project}'
361 - lf-infra-github-scm:
362 url: '{git-clone-url}{github-org}/{project}'
363 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
365 submodule-recursive: '{submodule-recursive}'
366 choosing-strategy: default
367 jenkins-ssh-credential: '{jenkins-ssh-credential}'
370 - github-pull-request:
371 trigger-phrase: '^run-sonar$'
372 only-trigger-phrase: false
373 status-context: 'Python Sonar'
376 white-list-target-branches:
378 included-regions: '{obj:github_included_regions}'
384 - lf_tox_verify: &lf_tox_verify
387 ######################
388 # Default parameters #
389 ######################
392 build-days-to-keep: 7
395 git-url: '$GIT_URL/$GERRIT_PROJECT'
396 github-url: 'https://github.com'
398 python-version: python2
400 submodule-recursive: true
404 gerrit_trigger_file_paths:
405 - compare-type: REG_EXP
408 # github_included_regions MUST match gerrit_trigger_file_paths
409 github_included_regions:
412 #####################
413 # Job Configuration #
414 #####################
416 project-type: freestyle
419 disabled: '{disable-job}'
422 - lf-infra-properties:
423 build-days-to-keep: '{build-days-to-keep}'
426 - lf-infra-parameters:
430 lftools-version: '{lftools-version}'
431 - lf-infra-tox-parameters:
433 tox-envs: '{tox-envs}'
436 default: '{parallel}'
437 description: Tox test type used to configure serial or parallel testing.
441 build-timeout: '{build-timeout}'
442 jenkins-ssh-credential: '{jenkins-ssh-credential}'
446 - lf-infra-tox-install:
447 python-version: '{python-version}'
448 - shell: !include-raw-escape: ../shell/tox-run.sh
454 # Python projects typically use tox to run testing.
455 name: '{project-name}-tox-verify-{stream}'
456 id: gerrit-tox-verify
459 ######################
460 # Default parameters #
461 ######################
463 gerrit_verify_triggers:
464 - patchset-created-event:
466 exclude-trivial-rebase: false
467 exclude-no-code-change: false
468 - draft-published-event
469 - comment-added-contains-event:
470 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
472 #####################
473 # Job Configuration #
474 #####################
477 - lf-infra-gerrit-scm:
478 jenkins-ssh-credential: '{jenkins-ssh-credential}'
480 refspec: '$GERRIT_REFSPEC'
481 branch: '$GERRIT_BRANCH'
482 submodule-recursive: '{submodule-recursive}'
483 choosing-strategy: gerrit
487 server-name: '{gerrit-server-name}'
488 trigger-on: '{obj:gerrit_verify_triggers}'
490 - project-compare-type: ANT
491 project-pattern: '{project}'
493 - branch-compare-type: ANT
494 branch-pattern: '**/{branch}'
495 file-paths: '{obj:gerrit_trigger_file_paths}'
498 # Python projects typically use tox to run testing.
499 name: '{project-name}-tox-verify-{stream}'
500 id: github-tox-verify
504 - lf-infra-properties:
505 build-days-to-keep: '{build-days-to-keep}'
507 url: '{github-url}/{github-org}/{project}'
510 - lf-infra-github-scm:
511 url: '{git-clone-url}{github-org}/{project}'
512 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
514 submodule-recursive: '{submodule-recursive}'
515 choosing-strategy: default
516 jenkins-ssh-credential: '{jenkins-ssh-credential}'
519 - github-pull-request:
520 trigger-phrase: '^(recheck|reverify)$'
521 only-trigger-phrase: false
522 status-context: 'Tox Verify'
525 white-list-target-branches:
527 included-regions: '{obj:github_included_regions}'