Chore: Upgrade Jenkins-job-builder to 6.3.0
[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 - _lf_info_vote_verify: &lf_info_vote_verify
40     name: lf-info-vote-verify
41
42     branch: master
43     stream: master
44     build-days-to-keep: 7
45     build-timeout: 15
46     disable-job: false
47     git-url: "$GIT_URL/$PROJECT"
48     submodule-timeout: 10
49     submodule-disable: false
50     submodule-recursive: true
51     gerrit-skip-vote: false
52
53     gerrit_verify_triggers:
54       - comment-added-contains-event:
55           comment-contains-value: '^Patch Set\s+\d+:\s+vote\s*$'
56       - comment-added-event:
57           approval-category: "Code-Review"
58           approval-value: 2
59
60     #####################
61     # Job Configuration #
62     #####################
63
64     disabled: "{disable-job}"
65
66     builders:
67       - check-info-votes:
68           jenkins-ssh-credential: "{jenkins-ssh-credential}"
69
70 - job-template:
71     name: "info-vote"
72     id: info-vote-verify
73     <<: *lf_info_vote_common
74     # yamllint disable-line rule:key-duplicates
75     <<: *lf_info_vote_verify
76
77     scm:
78       - lf-infra-gerrit-scm:
79           branch: "$GERRIT_BRANCH"
80           jenkins-ssh-credential: "{jenkins-ssh-credential}"
81           git-url: "{git-url}"
82           refspec: "$GERRIT_REFSPEC"
83           submodule-recursive: "{submodule-recursive}"
84           submodule-timeout: "{submodule-timeout}"
85           submodule-disable: "{submodule-disable}"
86           choosing-strategy: gerrit
87
88     triggers:
89       - gerrit:
90           server-name: "{gerrit-server-name}"
91           trigger-on: "{obj:gerrit_verify_triggers}"
92           projects:
93             - project-compare-type: "ANT"
94               project-pattern: "**"
95               branches:
96                 - branch-compare-type: "ANT"
97                   branch-pattern: "**/master"
98               file-paths: "{obj:gerrit_trigger_file_paths}"
99           skip-vote:
100             successful: "{gerrit-skip-vote}"
101             failed: "{gerrit-skip-vote}"
102             unstable: "{gerrit-skip-vote}"
103             notbuilt: "{gerrit-skip-vote}"