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 ######################
30 gerrit-skip-vote: false
31 git-url: '$GIT_URL/$GERRIT_PROJECT'
33 submodule-disable: false
34 submodule-recursive: true
37 gerrit_trigger_file_paths:
38 - compare-type: REG_EXP
45 project-type: freestyle
47 disabled: '{disable-job}'
50 - lf-infra-properties:
51 build-days-to-keep: '{build-days-to-keep}'
54 - lf-infra-parameters:
59 name: ARCHIVE_ARTIFACTS
60 default: '{archive-artifacts}'
61 description: Artifacts to archive to the logs server.
65 build-timeout: '{build-timeout}'
66 jenkins-ssh-credential: '{jenkins-ssh-credential}'
74 # Verify gerrit changeset by shell script.
75 # Runs on changeset branch to verify new commits; can be run on any branch.
77 # Required parameters:
78 # build-node: label (flavor) of jenkins build minion
79 # project: git repository
80 # project-name: Jenkins job name prefix
81 # script: shell script to execute
82 # Optional parameters:
83 # branch: git branch pattern, defaults to master
84 # stream: friendly stream name (often same as branch), defaults to master
86 name: '{project-name}-shell-verify-{stream}'
88 <<: *oran_shell_common
90 gerrit_verify_triggers:
91 - patchset-created-event:
93 exclude-trivial-rebase: false
94 exclude-no-code-change: false
95 - draft-published-event
96 - comment-added-contains-event:
97 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
100 - lf-infra-gerrit-scm:
101 jenkins-ssh-credential: '{jenkins-ssh-credential}'
103 refspec: '$GERRIT_REFSPEC'
104 branch: '$GERRIT_BRANCH'
105 submodule-recursive: '{submodule-recursive}'
106 submodule-timeout: '{submodule-timeout}'
107 submodule-disable: '{submodule-disable}'
108 choosing-strategy: gerrit
111 - timed: '{obj:cron}'
113 server-name: '{gerrit-server-name}'
114 trigger-on: '{obj:gerrit_verify_triggers}'
116 - project-compare-type: ANT
117 project-pattern: '{project}'
119 - branch-compare-type: ANT
120 branch-pattern: '**/{branch}'
121 file-paths: '{obj:gerrit_trigger_file_paths}'
123 successful: '{gerrit-skip-vote}'
124 failed: '{gerrit-skip-vote}'
125 unstable: '{gerrit-skip-vote}'
126 notbuilt: '{gerrit-skip-vote}'
128 # Build from gerrit by shell script.
129 # Triggered automatically by merge; can be run on any branch.
131 # Required parameters:
132 # build-node: label (flavor) of jenkins build minion
133 # project: git repository
134 # project-name: Jenkins job name prefix
135 # script: shell script to execute
136 # Optional parameters:
137 # branch: git branch pattern, defaults to master
138 # stream: friendly stream name (often same as branch), defaults to master
140 name: '{project-name}-shell-merge-{stream}'
142 <<: *oran_shell_common
144 gerrit_merge_triggers:
145 - change-merged-event
146 - comment-added-contains-event:
147 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
150 - lf-infra-gerrit-scm:
151 jenkins-ssh-credential: '{jenkins-ssh-credential}'
153 refspec: '$GERRIT_REFSPEC'
154 branch: '$GERRIT_BRANCH'
155 submodule-recursive: '{submodule-recursive}'
156 submodule-timeout: '{submodule-timeout}'
157 submodule-disable: '{submodule-disable}'
158 choosing-strategy: default
161 - timed: '{obj:cron}'
163 server-name: '{gerrit-server-name}'
164 trigger-on: '{obj:gerrit_merge_triggers}'
166 - project-compare-type: ANT
167 project-pattern: '{project}'
169 - branch-compare-type: ANT
170 branch-pattern: '**/{branch}'
171 file-paths: '{obj:gerrit_trigger_file_paths}'