blob: f5f3878ca85dc224662a859411189c41752a235a [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---
Anil Belur4e0d56a2023-04-18 11:49:03 +100015- _oran_shell_common: &oran_shell_common
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050016 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
Anil Belur439502c2023-05-07 12:39:38 +100027 cron: ""
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050028 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
Anil Belur439502c2023-05-07 12:39:38 +100031 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
Anil Belur439502c2023-05-07 12:39:38 +100040 pattern: ".*"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040041
42 #####################
43 # Job Configuration #
44 #####################
45
46 project-type: freestyle
Anil Belur439502c2023-05-07 12:39:38 +100047 node: "{build-node}"
48 disabled: "{disable-job}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040049
50 properties:
51 - lf-infra-properties:
Anil Belur439502c2023-05-07 12:39:38 +100052 build-days-to-keep: "{build-days-to-keep}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040053
54 parameters:
55 - lf-infra-parameters:
Anil Belur439502c2023-05-07 12:39:38 +100056 project: "{project}"
57 branch: "{branch}"
58 stream: "{stream}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050059 - string:
60 name: ARCHIVE_ARTIFACTS
Anil Belur439502c2023-05-07 12:39:38 +100061 default: "{archive-artifacts}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050062 description: Artifacts to archive to the logs server.
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040063
64 wrappers:
65 - lf-infra-wrappers:
Anil Belur439502c2023-05-07 12:39:38 +100066 build-timeout: "{build-timeout}"
67 jenkins-ssh-credential: "{jenkins-ssh-credential}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -040068
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}"
Anil Belur439502c2023-05-07 12:39:38 +100076 - 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:
Anil Belur439502c2023-05-07 12:39:38 +100094 name: "{project-name}-shell-verify-{stream}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -050095 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:
Anil Belur439502c2023-05-07 12:39:38 +1000109 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}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400116 choosing-strategy: gerrit
117
118 triggers:
Anil Belur439502c2023-05-07 12:39:38 +1000119 - timed: "{obj:cron}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400120 - gerrit:
Anil Belur439502c2023-05-07 12:39:38 +1000121 server-name: "{gerrit-server-name}"
122 trigger-on: "{obj:gerrit_verify_triggers}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400123 projects:
124 - project-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000125 project-pattern: "{project}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400126 branches:
127 - branch-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000128 branch-pattern: "**/{branch}"
129 file-paths: "{obj:gerrit_trigger_file_paths}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400130 skip-vote:
Anil Belur439502c2023-05-07 12:39:38 +1000131 successful: "{gerrit-skip-vote}"
132 failed: "{gerrit-skip-vote}"
133 unstable: "{gerrit-skip-vote}"
134 notbuilt: "{gerrit-skip-vote}"
Lott, Christopher (cl778h)4e00eb92019-10-29 15:52:35 -0400135
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:
Anil Belur439502c2023-05-07 12:39:38 +1000148 name: "{project-name}-shell-merge-{stream}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500149 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:
Anil Belur439502c2023-05-07 12:39:38 +1000159 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}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500166 choosing-strategy: default
167
168 triggers:
Anil Belur439502c2023-05-07 12:39:38 +1000169 - timed: "{obj:cron}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500170 - gerrit:
Anil Belur439502c2023-05-07 12:39:38 +1000171 server-name: "{gerrit-server-name}"
172 trigger-on: "{obj:gerrit_merge_triggers}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500173 projects:
174 - project-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000175 project-pattern: "{project}"
Lott, Christopher (cl778h)f77c9f62019-11-08 13:39:36 -0500176 branches:
177 - branch-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000178 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:
Anil Belur439502c2023-05-07 12:39:38 +1000195 name: "{project-name}-shell-release-{stream}"
Bin Yang5d9c5ea2020-02-19 11:43:58 +0800196 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:
Anil Belur439502c2023-05-07 12:39:38 +1000205 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}"
Bin Yang5d9c5ea2020-02-19 11:43:58 +0800212 choosing-strategy: default
213
214 triggers:
215 - gerrit:
Anil Belur439502c2023-05-07 12:39:38 +1000216 server-name: "{gerrit-server-name}"
Bin Yang5d9c5ea2020-02-19 11:43:58 +0800217 trigger-on:
218 - change-merged-event
219 projects:
220 - project-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000221 project-pattern: "{project}"
Bin Yang5d9c5ea2020-02-19 11:43:58 +0800222 branches:
223 - branch-compare-type: ANT
Anil Belur439502c2023-05-07 12:39:38 +1000224 branch-pattern: "**/{branch}"
225 file-paths: "{obj:gerrit_release_file_paths}"