Merge "create nonrtric jjb"
[ci-management.git] / jjb / oran-jjb / oran-shell-jobs.yaml
1 #   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 ---
15 #
16 # Template for verifying gerrit changeset by shell script.
17 # Runs on changeset branch to verify new commits; can also run on master.
18 #
19 # Required parameters:
20 #   build-node:     label (flavor) of jenkins build minion
21 #   project:        git repository
22 #   project-name:   Jenkins job name prefix
23 #   script:         shell script to execute
24 # Optional parameters:
25 #   branch:         git branch, defaults to master
26 #   stream:         friendly stream name (often same as branch), defaults to master
27 - job-template:
28     name: '{project-name}-verify-shell-{stream}'
29     id: oran-verify-shell
30
31     ######################
32     # Default parameters #
33     ######################
34
35     branch: master
36     build-days-to-keep: 7
37     build-timeout: 15
38     disable-job: false
39     gerrit_trigger_file_paths:
40       - compare-type: REG_EXP
41         pattern: '.*'
42     gerrit-skip-vote: false
43     gerrit_verify_triggers:
44       - patchset-created-event:
45           exclude-drafts: true
46           exclude-trivial-rebase: false
47           exclude-no-code-change: false
48       - draft-published-event
49       - comment-added-contains-event:
50           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
51     git-url: '$GIT_URL/$PROJECT'
52     stream: master
53     submodule-recursive: true
54     submodule-timeout: 10
55     submodule-disable: false
56
57     #####################
58     # Job Configuration #
59     #####################
60
61     project-type: freestyle
62     node: '{build-node}'
63     disabled: '{disable-job}'
64
65     properties:
66       - lf-infra-properties:
67           build-days-to-keep: '{build-days-to-keep}'
68
69     parameters:
70       - lf-infra-parameters:
71           project: '{project}'
72           branch: '{branch}'
73           stream: '{stream}'
74
75     wrappers:
76       - lf-infra-wrappers:
77           build-timeout: '{build-timeout}'
78           jenkins-ssh-credential: '{jenkins-ssh-credential}'
79
80     scm:
81       - lf-infra-gerrit-scm:
82           jenkins-ssh-credential: '{jenkins-ssh-credential}'
83           git-url: '{git-url}'
84           refspec: '$GERRIT_REFSPEC'
85           branch: '$GERRIT_BRANCH'
86           submodule-recursive: '{submodule-recursive}'
87           submodule-timeout: '{submodule-timeout}'
88           submodule-disable: '{submodule-disable}'
89           choosing-strategy: gerrit
90
91     triggers:
92       - gerrit:
93           server-name: '{gerrit-server-name}'
94           trigger-on: '{obj:gerrit_verify_triggers}'
95           projects:
96             - project-compare-type: ANT
97               project-pattern: '{project}'
98               branches:
99                 - branch-compare-type: ANT
100                   branch-pattern: '**/{branch}'
101               file-paths: '{obj:gerrit_trigger_file_paths}'
102           skip-vote:
103             successful: '{gerrit-skip-vote}'
104             failed: '{gerrit-skip-vote}'
105             unstable: '{gerrit-skip-vote}'
106             notbuilt: '{gerrit-skip-vote}'
107
108     builders:
109       - shell: '{script}'
110
111     publishers:
112       - lf-infra-publish