Pass multiple pattern args in logs-deploy.sh
[releng/global-jjb.git] / jjb / lf-node-jobs.yaml
1 ---
2
3 ###############
4 # Node Verify #
5 ###############
6
7 - lf_node_verify: &lf_node_verify
8     name: lf-node-verify
9
10     ######################
11     # Default parameters #
12     ######################
13
14     branch: master
15     build-days-to-keep: 7
16     build-timeout: 10
17     disable-job: false
18     git-url: '$GIT_URL/$GERRIT_PROJECT'
19     github-url: 'https://github.com'
20     node-dir: ''
21     stream: master
22     submodule-recursive: true
23     submodule-timeout: 10
24
25     gerrit_trigger_file_paths:
26       - compare-type: REG_EXP
27         pattern: '.*'
28
29     # github_included_regions MUST match gerrit_trigger_file_paths
30     github_included_regions:
31       - '.*'
32
33     #####################
34     # Job Configuration #
35     #####################
36
37     project-type: freestyle
38     node: '{build-node}'
39     concurrent: true
40     disabled: '{disable-job}'
41
42     properties:
43       - lf-infra-properties:
44           build-days-to-keep: '{build-days-to-keep}'
45
46     parameters:
47       - lf-infra-parameters:
48           project: '{project}'
49           branch: '{branch}'
50           stream: '{stream}'
51       - lf-infra-node-parameters:
52           node-dir: '{node-dir}'
53           node-version: '{node-version}'
54
55     wrappers:
56       - lf-infra-wrappers:
57           build-timeout: '{build-timeout}'
58           jenkins-ssh-credential: '{jenkins-ssh-credential}'
59
60     builders:
61       - shell: !include-raw-escape:
62           - ../shell/node-install.sh
63           - ../shell/node-run.sh
64
65     publishers:
66       - lf-infra-publish
67
68 - job-template:
69     name: '{project-name}-node-verify-{stream}'
70     id: gerrit-node-verify
71     <<: *lf_node_verify
72
73     ######################
74     # Default parameters #
75     ######################
76
77     gerrit_verify_triggers:
78       - patchset-created-event:
79           exclude-drafts: true
80           exclude-trivial-rebase: false
81           exclude-no-code-change: false
82       - draft-published-event
83       - comment-added-contains-event:
84           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
85
86     #####################
87     # Job Configuration #
88     #####################
89
90     scm:
91       - lf-infra-gerrit-scm:
92           jenkins-ssh-credential: '{jenkins-ssh-credential}'
93           git-url: '{git-url}'
94           refspec: '$GERRIT_REFSPEC'
95           branch: 'origin/$GERRIT_BRANCH'
96           submodule-recursive: '{submodule-recursive}'
97           submodule-timeout: '{submodule-timeout}'
98           choosing-strategy: gerrit
99
100     triggers:
101       - gerrit:
102           server-name: '{gerrit-server-name}'
103           trigger-on: '{obj:gerrit_verify_triggers}'
104           projects:
105             - project-compare-type: ANT
106               project-pattern: '{project}'
107               branches:
108                 - branch-compare-type: ANT
109                   branch-pattern: '**/{branch}'
110               file-paths: '{obj:gerrit_trigger_file_paths}'
111
112 - job-template:
113     name: '{project-name}-node-verify-{stream}'
114     id: github-node-verify
115     <<: *lf_node_verify
116
117     properties:
118       - lf-infra-properties:
119           build-days-to-keep: '{build-days-to-keep}'
120       - github:
121           url: '{github-url}/{github-org}/{project}'
122
123     scm:
124       - lf-infra-github-scm:
125           url: '{git-clone-url}{github-org}/{project}'
126           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
127           branch: '$sha1'
128           submodule-recursive: '{submodule-recursive}'
129           submodule-timeout: '{submodule-timeout}'
130           choosing-strategy: default
131           jenkins-ssh-credential: '{jenkins-ssh-credential}'
132
133     triggers:
134       - github-pull-request:
135           trigger-phrase: '^(recheck|reverify)$'
136           only-trigger-phrase: false
137           status-context: 'Node Verify'
138           permit-all: true
139           github-hooks: true
140           included-regions: '{obj:github_included_regions}'
141           white-list-target-branches:
142             - '{branch}'