blob: f4a236c91e1eabef533491451dfb6c68a06175f0 [file] [log] [blame]
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -04001# Copyright (c) 2019 AT&T Intellectual Property.
2#
3# Licensed under the Apache License, Version 2.0 (the 'License');
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an 'AS IS' BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14---
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050015- oran_shell_common: &oran_shell_common
16 name: oran-shell-common
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040017
18 ######################
19 # Default parameters #
20 ######################
21
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050022 archive-artifacts: >
23 **/*.log
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040024 branch: master
Lott, Christopher (cl778h)2984c9e2020-01-15 10:37:25 -050025 build-days-to-keep: 30
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040026 build-timeout: 15
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050027 cron: ''
28 concurrent: false
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040029 disable-job: false
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050030 gerrit-skip-vote: false
31 git-url: '$GIT_URL/$GERRIT_PROJECT'
Lott, Christopher (cl778h)d59c1b82019-11-14 09:06:25 -050032 mvn-global-settings: global-settings
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050033 stream: master
34 submodule-disable: false
35 submodule-recursive: true
36 submodule-timeout: 10
37
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040038 gerrit_trigger_file_paths:
39 - compare-type: REG_EXP
40 pattern: '.*'
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040041
42 #####################
43 # Job Configuration #
44 #####################
45
46 project-type: freestyle
47 node: '{build-node}'
48 disabled: '{disable-job}'
49
50 properties:
51 - lf-infra-properties:
52 build-days-to-keep: '{build-days-to-keep}'
53
54 parameters:
55 - lf-infra-parameters:
56 project: '{project}'
57 branch: '{branch}'
58 stream: '{stream}'
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050059 - string:
60 name: ARCHIVE_ARTIFACTS
61 default: '{archive-artifacts}'
62 description: Artifacts to archive to the logs server.
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040063
64 wrappers:
65 - lf-infra-wrappers:
66 build-timeout: '{build-timeout}'
67 jenkins-ssh-credential: '{jenkins-ssh-credential}'
68
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050069 builders:
Lott, Christopher (cl778h)d59c1b82019-11-14 09:06:25 -050070 - lf-infra-pre-build
71 - lf-provide-maven-settings:
72 global-settings-file: "{mvn-global-settings}"
73 settings-file: "{mvn-settings}"
74 - lf-infra-create-netrc:
75 server-id: "{mvn-site-id}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050076 - shell: '{script}'
Lott, Christopher (cl778h)d59c1b82019-11-14 09:06:25 -050077 - lf-provide-maven-settings-cleanup
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050078
79 publishers:
80 - lf-infra-publish
81
82# Verify gerrit changeset by shell script.
83# Runs on changeset branch to verify new commits; can be run on any branch.
84#
85# Required parameters:
86# build-node: label (flavor) of jenkins build minion
87# project: git repository
88# project-name: Jenkins job name prefix
89# script: shell script to execute
90# Optional parameters:
91# branch: git branch pattern, defaults to master
92# stream: friendly stream name (often same as branch), defaults to master
93- job-template:
94 name: '{project-name}-shell-verify-{stream}'
95 id: oran-shell-verify
96 <<: *oran_shell_common
97
98 gerrit_verify_triggers:
99 - patchset-created-event:
100 exclude-drafts: true
101 exclude-trivial-rebase: false
102 exclude-no-code-change: false
103 - draft-published-event
104 - comment-added-contains-event:
105 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
106
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400107 scm:
108 - lf-infra-gerrit-scm:
109 jenkins-ssh-credential: '{jenkins-ssh-credential}'
110 git-url: '{git-url}'
111 refspec: '$GERRIT_REFSPEC'
112 branch: '$GERRIT_BRANCH'
113 submodule-recursive: '{submodule-recursive}'
114 submodule-timeout: '{submodule-timeout}'
115 submodule-disable: '{submodule-disable}'
116 choosing-strategy: gerrit
117
118 triggers:
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500119 - timed: '{obj:cron}'
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400120 - gerrit:
121 server-name: '{gerrit-server-name}'
122 trigger-on: '{obj:gerrit_verify_triggers}'
123 projects:
124 - project-compare-type: ANT
125 project-pattern: '{project}'
126 branches:
127 - branch-compare-type: ANT
128 branch-pattern: '**/{branch}'
129 file-paths: '{obj:gerrit_trigger_file_paths}'
130 skip-vote:
131 successful: '{gerrit-skip-vote}'
132 failed: '{gerrit-skip-vote}'
133 unstable: '{gerrit-skip-vote}'
134 notbuilt: '{gerrit-skip-vote}'
135
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500136# Build from gerrit by shell script.
137# Triggered automatically by merge; can be run on any branch.
138#
139# Required parameters:
140# build-node: label (flavor) of jenkins build minion
141# project: git repository
142# project-name: Jenkins job name prefix
143# script: shell script to execute
144# Optional parameters:
145# branch: git branch pattern, defaults to master
146# stream: friendly stream name (often same as branch), defaults to master
147- job-template:
148 name: '{project-name}-shell-merge-{stream}'
149 id: oran-shell-merge
150 <<: *oran_shell_common
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400151
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500152 gerrit_merge_triggers:
153 - change-merged-event
154 - comment-added-contains-event:
155 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
156
157 scm:
158 - lf-infra-gerrit-scm:
159 jenkins-ssh-credential: '{jenkins-ssh-credential}'
160 git-url: '{git-url}'
161 refspec: '$GERRIT_REFSPEC'
162 branch: '$GERRIT_BRANCH'
163 submodule-recursive: '{submodule-recursive}'
164 submodule-timeout: '{submodule-timeout}'
165 submodule-disable: '{submodule-disable}'
166 choosing-strategy: default
167
168 triggers:
169 - timed: '{obj:cron}'
170 - gerrit:
171 server-name: '{gerrit-server-name}'
172 trigger-on: '{obj:gerrit_merge_triggers}'
173 projects:
174 - project-compare-type: ANT
175 project-pattern: '{project}'
176 branches:
177 - branch-compare-type: ANT
178 branch-pattern: '**/{branch}'
179 file-paths: '{obj:gerrit_trigger_file_paths}'
Bin Yang5d9c5ea2020-02-19 11:43:58 +0800180
181# Build and publish artifact from gerrit by shell script.
182# Triggered automatically by merging specific release file;
183# can be run on any branch.
184#
185# Required parameters:
186# build-node: label (flavor) of jenkins build minion
187# project: git repository
188# project-name: Jenkins job name prefix
189# script: shell script to execute
190# Optional parameters:
191# branch: git branch pattern, defaults to master
192# stream: friendly stream name (often same as branch), defaults to master
193# gerrit_release_file_paths: Pathname pattern of the release file to trigger this job
194- job-template:
195 name: '{project-name}-shell-release-{stream}'
196 id: oran-shell-release
197 <<: *oran_shell_common
198
199 gerrit_release_file_paths:
200 - compare-type: REG_EXP
201 pattern: 'releases\/oran-shell-release.*\.yaml'
202
203 scm:
204 - lf-infra-gerrit-scm:
205 jenkins-ssh-credential: '{jenkins-ssh-credential}'
206 git-url: '{git-url}'
207 refspec: '$GERRIT_REFSPEC'
208 branch: '$GERRIT_BRANCH'
209 submodule-recursive: '{submodule-recursive}'
210 submodule-timeout: '{submodule-timeout}'
211 submodule-disable: '{submodule-disable}'
212 choosing-strategy: default
213
214 triggers:
215 - gerrit:
216 server-name: '{gerrit-server-name}'
217 trigger-on:
218 - change-merged-event
219 projects:
220 - project-compare-type: ANT
221 project-pattern: '{project}'
222 branches:
223 - branch-compare-type: ANT
224 branch-pattern: '**/{branch}'
225 file-paths: '{obj:gerrit_release_file_paths}'
226