Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 1 | --- |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 2 | # maven jobs for Java projects |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 3 | |
| 4 | - job-template: |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 5 | id: maven-install |
| 6 | name: '{project}-gerrit' |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 7 | description: | |
| 8 | <!-- Managed by Jenkins Job Builder --> |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 9 | Created by {id} job-template from ci-management/jjb/maven.yaml |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 10 | |
| 11 | node: 'ubuntu16.04-basebuild-1c-2g' |
Matteo Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 12 | project-type: freestyle |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 13 | |
Kailash Khalasi | f3f15bd | 2018-05-09 09:58:52 -0700 | [diff] [blame] | 14 | parameters: |
| 15 | - string: |
Kailash Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 16 | name: GERRIT_BRANCH |
| 17 | default: 'master' |
Kailash Khalasi | f3f15bd | 2018-05-09 09:58:52 -0700 | [diff] [blame] | 18 | description: 'Use default when using "Build Now"' |
| 19 | |
| 20 | - string: |
Kailash Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 21 | name: GERRIT_REFSPEC |
| 22 | default: 'refs/heads/master' |
Kailash Khalasi | f3f15bd | 2018-05-09 09:58:52 -0700 | [diff] [blame] | 23 | description: 'Use default when using "Build Now"' |
| 24 | |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 25 | triggers: |
| 26 | - cord-infra-gerrit-trigger-patchset: |
| 27 | gerrit-server-name: '{gerrit-server-name}' |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 28 | project-regexp: '{project}' |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 29 | 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 Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 37 | |
| 38 | scm: |
| 39 | - git: |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 40 | url: '{gerrit-server-url}/{project}' |
Kailash Khalasi | 1b3d3fe | 2018-05-09 13:20:22 -0700 | [diff] [blame] | 41 | branches: |
| 42 | - '$GERRIT_BRANCH' |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 43 | refspec: '$GERRIT_REFSPEC' |
Kailash Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 44 | choosing-strategy: 'gerrit' |
Kailash Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 45 | shallow-clone: true |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 46 | |
Matteo Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 47 | 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 Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 60 | |
| 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 Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 100 | 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' |