1 # Copyright (c) 2019 AT&T Intellectual Property.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 - _oran_shell_common: &oran_shell_common
16 name: oran-shell-common
18 ######################
19 # Default parameters #
20 ######################
25 build-days-to-keep: 30
30 gerrit-skip-vote: false
31 git-url: "$GIT_URL/$GERRIT_PROJECT"
32 mvn-global-settings: global-settings
34 submodule-disable: false
35 submodule-recursive: true
38 gerrit_trigger_file_paths:
39 - compare-type: REG_EXP
46 project-type: freestyle
48 disabled: "{disable-job}"
51 - lf-infra-properties:
52 build-days-to-keep: "{build-days-to-keep}"
55 - lf-infra-parameters:
60 name: ARCHIVE_ARTIFACTS
61 default: "{archive-artifacts}"
62 description: Artifacts to archive to the logs server.
66 build-timeout: "{build-timeout}"
67 jenkins-ssh-credential: "{jenkins-ssh-credential}"
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}"
77 - lf-provide-maven-settings-cleanup
82 # Verify gerrit changeset by shell script.
83 # Runs on changeset branch to verify new commits; can be run on any branch.
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
94 name: "{project-name}-shell-verify-{stream}"
96 <<: *oran_shell_common
98 gerrit_verify_triggers:
99 - patchset-created-event:
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*$'
108 - lf-infra-gerrit-scm:
109 jenkins-ssh-credential: "{jenkins-ssh-credential}"
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
119 - timed: "{obj:cron}"
121 server-name: "{gerrit-server-name}"
122 trigger-on: "{obj:gerrit_verify_triggers}"
124 - project-compare-type: ANT
125 project-pattern: "{project}"
127 - branch-compare-type: ANT
128 branch-pattern: "**/{branch}"
129 file-paths: "{obj:gerrit_trigger_file_paths}"
131 successful: "{gerrit-skip-vote}"
132 failed: "{gerrit-skip-vote}"
133 unstable: "{gerrit-skip-vote}"
134 notbuilt: "{gerrit-skip-vote}"
136 # Build from gerrit by shell script.
137 # Triggered automatically by merge; can be run on any branch.
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
148 name: "{project-name}-shell-merge-{stream}"
150 <<: *oran_shell_common
152 gerrit_merge_triggers:
153 - change-merged-event
154 - comment-added-contains-event:
155 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
158 - lf-infra-gerrit-scm:
159 jenkins-ssh-credential: "{jenkins-ssh-credential}"
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
169 - timed: "{obj:cron}"
171 server-name: "{gerrit-server-name}"
172 trigger-on: "{obj:gerrit_merge_triggers}"
174 - project-compare-type: ANT
175 project-pattern: "{project}"
177 - branch-compare-type: ANT
178 branch-pattern: "**/{branch}"
179 file-paths: "{obj:gerrit_trigger_file_paths}"
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.
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
195 name: "{project-name}-shell-release-{stream}"
196 id: oran-shell-release
197 <<: *oran_shell_common
199 gerrit_release_file_paths:
200 - compare-type: REG_EXP
201 pattern: 'releases\/oran-shell-release.*\.yaml'
204 - lf-infra-gerrit-scm:
205 jenkins-ssh-credential: "{jenkins-ssh-credential}"
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
216 server-name: "{gerrit-server-name}"
218 - change-merged-event
220 - project-compare-type: ANT
221 project-pattern: "{project}"
223 - branch-compare-type: ANT
224 branch-pattern: "**/{branch}"
225 file-paths: "{obj:gerrit_release_file_paths}"