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: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 5 | id: maven-test |
| 6 | name: 'verify_{project}_maven-test{name-extension}' |
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: |
hwchiu | 14f9785 | 2019-10-08 10:51:11 -0700 | [diff] [blame] | 16 | name: jdkDistro |
| 17 | default: '{jdk-distribution}' |
| 18 | description: 'Distribution of the JDK to use with update-java-alternatives' |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 19 | |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 20 | triggers: |
| 21 | - cord-infra-gerrit-trigger-patchset: |
| 22 | gerrit-server-name: '{gerrit-server-name}' |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 23 | project-regexp: '{project}' |
Kailash Khalasi | 69c8fcd | 2018-05-09 09:43:49 -0700 | [diff] [blame] | 24 | branch-regexp: '{branch-regexp}' |
| 25 | file-include-regexp: '{all-files-regexp}' |
| 26 | dependency-jobs: '{dependency-jobs}' |
| 27 | |
| 28 | properties: |
| 29 | - cord-infra-properties: |
| 30 | build-days-to-keep: '{build-days-to-keep}' |
| 31 | artifact-num-to-keep: '{artifact-num-to-keep}' |
Kailash Khalasi | a5ca0c7 | 2018-05-09 12:00:21 -0700 | [diff] [blame] | 32 | |
| 33 | scm: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 34 | - lf-infra-gerrit-scm: |
| 35 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
Kailash Khalasi | 45f4e2c | 2018-05-09 14:09:50 -0700 | [diff] [blame] | 36 | refspec: '$GERRIT_REFSPEC' |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 37 | branch: '$GERRIT_BRANCH' |
| 38 | submodule-recursive: 'false' |
| 39 | choosing-strategy: gerrit |
| 40 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 41 | |
Matteo Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 42 | builders: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 43 | # Set JDK version |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 44 | - shell: | |
| 45 | #!/usr/bin/env bash |
| 46 | set -eu -o pipefail |
| 47 | echo "Setting JDK Distro to: $jdkDistro" |
Zack Williams | bfe8386 | 2019-09-19 22:18:04 -0700 | [diff] [blame] | 48 | sudo update-java-alternatives -s $jdkDistro |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 49 | echo "Java Version:" |
| 50 | java -version |
| 51 | |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 52 | # run tests and install |
Matteo Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 53 | - maven-target: |
| 54 | pom: pom.xml |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 55 | settings: onoscord-apps |
| 56 | settings-type: cfp |
| 57 | goals: 'clean test install' |
| 58 | |
| 59 | publishers: |
| 60 | - junit: |
| 61 | results: "**/TEST-*.xml" |
| 62 | allow-empty-results: '{junit-allow-empty-results}' |
| 63 | - cobertura: |
| 64 | report-file: "**/*coverage.xml" |
| 65 | targets: |
| 66 | - files: |
| 67 | healthy: 80 |
| 68 | unhealthy: 0 |
| 69 | failing: 0 |
| 70 | - method: |
| 71 | healthy: 50 |
| 72 | unhealthy: 0 |
| 73 | failing: 0 |
Matteo Scandolo | 0024038 | 2018-11-26 14:42:32 -0800 | [diff] [blame] | 74 | |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 75 | - job-template: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 76 | id: maven-publish |
| 77 | name: 'maven-publish{name-extension}_{project}' |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 78 | description: | |
| 79 | <!-- Managed by Jenkins Job Builder --> |
| 80 | Created by {id} job-template from ci-management/jjb/maven.yaml |
| 81 | |
| 82 | node: 'ubuntu16.04-basebuild-1c-2g' |
| 83 | project-type: freestyle |
| 84 | |
| 85 | parameters: |
| 86 | - string: |
hwchiu | 14f9785 | 2019-10-08 10:51:11 -0700 | [diff] [blame] | 87 | name: jdkDistro |
| 88 | default: '{jdk-distribution}' |
| 89 | description: 'Distribution of the JDK to use with update-java-alternatives' |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 90 | |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 91 | triggers: |
| 92 | - cord-infra-gerrit-trigger-merge: |
| 93 | gerrit-server-name: '{gerrit-server-name}' |
| 94 | project-regexp: '{project}' |
| 95 | branch-regexp: '{branch-regexp}' |
| 96 | file-include-regexp: '{all-files-regexp}' |
| 97 | dependency-jobs: '{dependency-jobs}' |
| 98 | |
| 99 | properties: |
| 100 | - cord-infra-properties: |
| 101 | build-days-to-keep: '{build-days-to-keep}' |
| 102 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 103 | |
| 104 | scm: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 105 | - lf-infra-gerrit-scm: |
| 106 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 107 | refspec: '$GERRIT_REFSPEC' |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 108 | branch: '$GERRIT_BRANCH' |
| 109 | submodule-recursive: 'false' |
| 110 | choosing-strategy: gerrit |
| 111 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 112 | |
| 113 | builders: |
Zack Williams | 866ef3c | 2019-09-27 15:41:02 -0700 | [diff] [blame] | 114 | # Set JDK version |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 115 | - shell: | |
| 116 | #!/usr/bin/env bash |
| 117 | set -eu -o pipefail |
| 118 | echo "Setting JDK Distro to: $jdkDistro" |
Zack Williams | bfe8386 | 2019-09-19 22:18:04 -0700 | [diff] [blame] | 119 | sudo update-java-alternatives -s $jdkDistro |
Zack Williams | 234dc92 | 2019-08-30 17:03:57 -0700 | [diff] [blame] | 120 | echo "Java Version:" |
| 121 | java -version |
| 122 | |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 123 | - maven-target: |
| 124 | pom: pom.xml |
| 125 | settings: onoscord-apps |
Matteo Scandolo | e7ee33c | 2019-05-23 13:23:13 -0700 | [diff] [blame] | 126 | settings-type: cfp |
Matteo Scandolo | 23cde38 | 2019-05-22 17:00:43 -0700 | [diff] [blame] | 127 | goals: 'clean deploy' |