blob: 259fb4ebeddabfa3477274eb15cc165e11671972 [file] [log] [blame]
Lasse Kaihlavirta41b283b2020-12-16 19:19:52 +02001####################
2# COMMON FUNCTIONS #
3####################
4
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +02005- integration_maven_common: &integration_maven_common
Lasse Kaihlavirta41b283b2020-12-16 19:19:52 +02006 # 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 Kaihlavirta61ad9512020-12-09 16:30:49 +020010 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 Kaihlavirta7bab0132020-12-16 14:14:21 +020057 choosing-strategy: "gerrit"
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +020058
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 Kaihlavirta41b283b2020-12-16 19:19:52 +0200107 # Job template for creating snapshot docker images
108 # identified by given unique tag with maven
109 # in project-specific CSIT flow
110
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +0200111 name: "{project-name}-{stream}-maven-docker-snapshot"
Lasse Kaihlavirta41b283b2020-12-16 19:19:52 +0200112 id: gerrit-maven-docker-snapshot
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +0200113 <<: *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 Kaihlavirta16e325b2020-12-14 19:55:43 +0200135 maven-version: mvn36
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +0200136 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 Kaihlavirtae5a2bbb2020-12-14 18:00:21 +0200151 - maven-exec:
152 maven-version: '{maven-version}'
Lasse Kaihlavirta16e325b2020-12-14 19:55:43 +0200153 - maven-params:
154 mvn-params: '{mvn-params}'
155
Lasse Kaihlavirta61ad9512020-12-09 16:30:49 +0200156 - integration-unique-docker-tag:
157 unique-docker-tag: ''