Change project comapre type to ANT
[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[ ]+[0-9]+:([ ]+|[\n]+)(vote)$'
57       - comment-added-event:
58           approval-category: 'CRVW'
59           approval-value: 2
60       - comment-added:
61           approval-category: 'Code-Review'
62           approval-value: 2
63
64     #####################
65     # Job Configuration #
66     #####################
67
68     disabled: '{disable-job}'
69
70     builders:
71       - check-info-votes:
72           jenkins-ssh-credential: '{jenkins-ssh-credential}'
73
74 - job-template:
75     name: 'info-vote'
76     id: info-vote-verify
77     <<: *lf_info_vote_common
78     # yamllint disable-line rule:key-duplicates
79     <<: *lf_info_vote_verify
80
81     scm:
82       - lf-infra-gerrit-scm:
83           branch: '$GERRIT_BRANCH'
84           jenkins-ssh-credential: '{jenkins-ssh-credential}'
85           git-url: '{git-url}'
86           refspec: '$GERRIT_REFSPEC'
87           submodule-recursive: '{submodule-recursive}'
88           submodule-timeout: '{submodule-timeout}'
89           submodule-disable: '{submodule-disable}'
90           choosing-strategy: gerrit
91
92     triggers:
93       - gerrit:
94           server-name: '{gerrit-server-name}'
95           trigger-on: '{obj:gerrit_verify_triggers}'
96           projects:
97             - project-compare-type: 'ANT'
98               project-pattern: '**'
99               branches:
100                 - branch-compare-type: 'ANT'
101                   branch-pattern: '**/master'
102               file-paths: '{obj:gerrit_trigger_file_paths}'
103           skip-vote:
104             successful: '{gerrit-skip-vote}'
105             failed: '{gerrit-skip-vote}'
106             unstable: '{gerrit-skip-vote}'
107             notbuilt: '{gerrit-skip-vote}'