Merge "Add Docker Verify and Merge jobs"
[releng/global-jjb.git] / jjb / lf-info-vote.yaml
1 ---
2 ####################
3 # COMMON FUNCTIONS #
4 ####################
5
6 - lf_info_vote_common: &lf_info_vote_common
7     name: lf-info-vote-common
8
9     gerrit_trigger_file_paths:
10       - compare-type: REG_EXP
11         pattern: 'INFO.yaml'
12
13     #####################
14     # Job Configuration #
15     #####################
16
17     project-type: freestyle
18     node: '{build-node}'
19
20     properties:
21       - lf-infra-properties:
22           build-days-to-keep: 7
23
24     parameters:
25       - lf-infra-parameters:
26           project: $GERRIT_PROJECT
27           branch: 'master'
28           refspec: 'refs/heads/{branch}'
29           stream: 'master'
30
31     wrappers:
32       - lf-infra-wrappers:
33           build-timeout: '{build-timeout}'
34           jenkins-ssh-credential: '{jenkins-ssh-credential}'
35
36     publishers:
37       - lf-infra-publish
38
39
40 - lf_info_vote_verify: &lf_info_vote_verify
41     name: lf-info-vote-verify
42
43     branch: master
44     stream: master
45     build-days-to-keep: 7
46     build-timeout: 15
47     disable-job: false
48     git-url: '$GIT_URL/$PROJECT'
49     submodule-timeout: 10
50     submodule-disable: false
51     submodule-recursive: true
52     gerrit-skip-vote: false
53
54     gerrit_verify_triggers:
55       - comment-added-contains-event:
56           comment-contains-value: '^Patch Set\s+\d+:\s+vote\s*$'
57       - comment-added-event:
58           approval-category: 'Code-Review'
59           approval-value: 2
60
61     #####################
62     # Job Configuration #
63     #####################
64
65     disabled: '{disable-job}'
66
67     builders:
68       - check-info-votes:
69           jenkins-ssh-credential: '{jenkins-ssh-credential}'
70
71 - job-template:
72     name: 'info-vote'
73     id: info-vote-verify
74     <<: *lf_info_vote_common
75     # yamllint disable-line rule:key-duplicates
76     <<: *lf_info_vote_verify
77
78     scm:
79       - lf-infra-gerrit-scm:
80           branch: '$GERRIT_BRANCH'
81           jenkins-ssh-credential: '{jenkins-ssh-credential}'
82           git-url: '{git-url}'
83           refspec: '$GERRIT_REFSPEC'
84           submodule-recursive: '{submodule-recursive}'
85           submodule-timeout: '{submodule-timeout}'
86           submodule-disable: '{submodule-disable}'
87           choosing-strategy: gerrit
88
89     triggers:
90       - gerrit:
91           server-name: '{gerrit-server-name}'
92           trigger-on: '{obj:gerrit_verify_triggers}'
93           projects:
94             - project-compare-type: 'ANT'
95               project-pattern: '**'
96               branches:
97                 - branch-compare-type: 'ANT'
98                   branch-pattern: '**/master'
99               file-paths: '{obj:gerrit_trigger_file_paths}'
100           skip-vote:
101             successful: '{gerrit-skip-vote}'
102             failed: '{gerrit-skip-vote}'
103             unstable: '{gerrit-skip-vote}'
104             notbuilt: '{gerrit-skip-vote}'