Lasse Kaihlavirta | 41b283b | 2020-12-16 19:19:52 +0200 | [diff] [blame^] | 1 | #################### |
| 2 | # COMMON FUNCTIONS # |
| 3 | #################### |
| 4 | |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 5 | - integration_maven_common: &integration_maven_common |
Lasse Kaihlavirta | 41b283b | 2020-12-16 19:19:52 +0200 | [diff] [blame^] | 6 | # This common maven base template is based on |
| 7 | # lf-maven-common in global-jjb/jjb/lf-maven-jobs.yaml |
| 8 | # and adjusted for jobs in project-specific CSIT flow |
| 9 | |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 10 | name: integration-maven-common |
| 11 | |
| 12 | ###################### |
| 13 | # Default parameters # |
| 14 | ###################### |
| 15 | |
| 16 | archive-artifacts: > |
| 17 | **/*.log |
| 18 | **/hs_err_*.log |
| 19 | **/target/**/feature.xml |
| 20 | **/target/failsafe-reports/failsafe-summary.xml |
| 21 | **/target/surefire-reports/*-output.txt |
| 22 | |
| 23 | ##################### |
| 24 | # Job Configuration # |
| 25 | ##################### |
| 26 | |
| 27 | project-type: freestyle |
| 28 | node: "{build-node}" |
| 29 | |
| 30 | properties: |
| 31 | - lf-infra-properties: |
| 32 | build-days-to-keep: "{build-days-to-keep}" |
| 33 | |
| 34 | parameters: |
| 35 | - lf-infra-parameters: |
| 36 | project: "{project}" |
| 37 | branch: "{branch}" |
| 38 | stream: "{stream}" |
| 39 | - lf-infra-maven-parameters: |
| 40 | mvn-opts: "{mvn-opts}" |
| 41 | mvn-params: "{mvn-params}" |
| 42 | mvn-version: "{mvn-version}" |
| 43 | - string: |
| 44 | name: ARCHIVE_ARTIFACTS |
| 45 | default: "{archive-artifacts}" |
| 46 | description: Artifacts to archive to the logs server. |
| 47 | |
| 48 | scm: |
| 49 | - lf-infra-gerrit-scm: |
| 50 | jenkins-ssh-credential: "{jenkins-ssh-credential}" |
| 51 | git-url: "{git-url}" |
| 52 | refspec: "$GERRIT_REFSPEC" |
| 53 | branch: "$GERRIT_BRANCH" |
| 54 | submodule-recursive: "{submodule-recursive}" |
| 55 | submodule-timeout: "{submodule-timeout}" |
| 56 | submodule-disable: "{submodule-disable}" |
Lasse Kaihlavirta | 7bab013 | 2020-12-16 14:14:21 +0200 | [diff] [blame] | 57 | choosing-strategy: "gerrit" |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 58 | |
| 59 | wrappers: |
| 60 | - lf-infra-wrappers: |
| 61 | build-timeout: "{build-timeout}" |
| 62 | jenkins-ssh-credential: "{jenkins-ssh-credential}" |
| 63 | |
| 64 | publishers: |
| 65 | - lf-infra-publish |
| 66 | |
| 67 | ############################# |
| 68 | # Maven Snapshot for Docker # |
| 69 | ############################# |
| 70 | |
| 71 | - integration_maven_docker_snapshot: &integration_maven_docker_snapshot |
| 72 | name: integration-maven-docker-snapshot |
| 73 | |
| 74 | builders: |
| 75 | - lf-infra-pre-build |
| 76 | - lf-jacoco-nojava-workaround |
| 77 | - lf-maven-install: |
| 78 | mvn-version: "{mvn-version}" |
| 79 | - lf-update-java-alternatives: |
| 80 | java-version: "{java-version}" |
| 81 | - lf-infra-docker-login: |
| 82 | global-settings-file: "{mvn-global-settings}" |
| 83 | settings-file: "{mvn-settings}" |
| 84 | # must provide maven settings AFTER docker-login due to its cleanup |
| 85 | - lf-provide-maven-settings: |
| 86 | global-settings-file: "{mvn-global-settings}" |
| 87 | settings-file: "{mvn-settings}" |
| 88 | - lf-maven-versions-plugin: |
| 89 | maven-versions-plugin: "{maven-versions-plugin}" |
| 90 | version-properties-file: "{version-properties-file}" |
| 91 | mvn-version: "{mvn-version}" |
| 92 | mvn-pom: "{mvn-pom}" |
| 93 | mvn-settings: "{mvn-settings}" |
| 94 | - inject: |
| 95 | properties-content: | |
| 96 | CONTAINER_PULL_REGISTRY={container-public-registry} |
| 97 | CONTAINER_PUSH_REGISTRY={container-snapshot-registry} |
| 98 | - lf-maven-build: |
| 99 | mvn-goals: "{mvn-goals}" |
| 100 | - lf-sigul-sign-dir: |
| 101 | sign-artifacts: "{sign-artifacts}" |
| 102 | sign-dir: "$WORKSPACE/m2repo" |
| 103 | sign-mode: "{sign-mode}" |
| 104 | - lf-provide-maven-settings-cleanup |
| 105 | |
| 106 | - job-template: |
Lasse Kaihlavirta | 41b283b | 2020-12-16 19:19:52 +0200 | [diff] [blame^] | 107 | # Job template for creating snapshot docker images |
| 108 | # identified by given unique tag with maven |
| 109 | # in project-specific CSIT flow |
| 110 | |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 111 | name: "{project-name}-{stream}-maven-docker-snapshot" |
Lasse Kaihlavirta | 41b283b | 2020-12-16 19:19:52 +0200 | [diff] [blame^] | 112 | id: gerrit-maven-docker-snapshot |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 113 | <<: *integration_maven_common |
| 114 | # yamllint disable-line rule:key-duplicates |
| 115 | <<: *integration_maven_docker_snapshot |
| 116 | |
| 117 | ###################### |
| 118 | # Default parameters # |
| 119 | ###################### |
| 120 | |
| 121 | branch: master |
| 122 | build-days-to-keep: 30 # 30 days in case a release takes long to get approved. |
| 123 | build-timeout: 60 |
| 124 | disable-job: false |
| 125 | git-url: "$GIT_URL/$PROJECT" |
| 126 | github-url: "https://github.com" |
| 127 | java-version: openjdk8 |
| 128 | maven-versions-plugin: false |
| 129 | version-properties-file: version.properties |
| 130 | mvn-central: false |
| 131 | mvn-global-settings: global-settings |
| 132 | mvn-goals: clean deploy |
| 133 | mvn-opts: "" |
| 134 | mvn-params: "" |
Lasse Kaihlavirta | 16e325b | 2020-12-14 19:55:43 +0200 | [diff] [blame] | 135 | maven-version: mvn36 |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 136 | ossrh-profile-id: "" |
| 137 | mvn-pom: "" |
| 138 | sign-artifacts: false |
| 139 | sign-mode: serial |
| 140 | stream: master |
| 141 | submodule-recursive: true |
| 142 | submodule-timeout: 10 |
| 143 | submodule-disable: false |
| 144 | |
| 145 | parameters: |
| 146 | - infra-parameters: |
| 147 | project: '{project}' |
| 148 | branch: '{branch}' |
| 149 | refspec: 'refs/heads/{branch}' |
| 150 | artifacts: '{archive-artifacts}' |
Lasse Kaihlavirta | e5a2bbb | 2020-12-14 18:00:21 +0200 | [diff] [blame] | 151 | - maven-exec: |
| 152 | maven-version: '{maven-version}' |
Lasse Kaihlavirta | 16e325b | 2020-12-14 19:55:43 +0200 | [diff] [blame] | 153 | - maven-params: |
| 154 | mvn-params: '{mvn-params}' |
| 155 | |
Lasse Kaihlavirta | 61ad951 | 2020-12-09 16:30:49 +0200 | [diff] [blame] | 156 | - integration-unique-docker-tag: |
| 157 | unique-docker-tag: '' |