36475e550b1a715b9fe3225a74b8bb885597213c
[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           lftools-version: '{lftools-version}'
52       - lf-infra-node-parameters:
53           node-dir: '{node-dir}'
54           node-version: '{node-version}'
55
56     wrappers:
57       - lf-infra-wrappers:
58           build-timeout: '{build-timeout}'
59           jenkins-ssh-credential: '{jenkins-ssh-credential}'
60
61     builders:
62       - shell: !include-raw-escape:
63           - ../shell/node-install.sh
64           - ../shell/node-run.sh
65
66     publishers:
67       - lf-infra-publish
68
69 - job-template:
70     name: '{project-name}-node-verify-{stream}'
71     id: gerrit-node-verify
72     <<: *lf_node_verify
73
74     ######################
75     # Default parameters #
76     ######################
77
78     gerrit_verify_triggers:
79       - patchset-created-event:
80           exclude-drafts: true
81           exclude-trivial-rebase: false
82           exclude-no-code-change: false
83       - draft-published-event
84       - comment-added-contains-event:
85           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
86
87     #####################
88     # Job Configuration #
89     #####################
90
91     scm:
92       - lf-infra-gerrit-scm:
93           jenkins-ssh-credential: '{jenkins-ssh-credential}'
94           git-url: '{git-url}'
95           refspec: '$GERRIT_REFSPEC'
96           branch: 'origin/$GERRIT_BRANCH'
97           submodule-recursive: '{submodule-recursive}'
98           submodule-timeout: '{submodule-timeout}'
99           choosing-strategy: gerrit
100
101     triggers:
102       - gerrit:
103           server-name: '{gerrit-server-name}'
104           trigger-on: '{obj:gerrit_verify_triggers}'
105           projects:
106             - project-compare-type: ANT
107               project-pattern: '{project}'
108               branches:
109                 - branch-compare-type: ANT
110                   branch-pattern: '**/{branch}'
111               file-paths: '{obj:gerrit_trigger_file_paths}'
112
113 - job-template:
114     name: '{project-name}-node-verify-{stream}'
115     id: github-node-verify
116     <<: *lf_node_verify
117
118     properties:
119       - lf-infra-properties:
120           build-days-to-keep: '{build-days-to-keep}'
121       - github:
122           url: '{github-url}/{github-org}/{project}'
123
124     scm:
125       - lf-infra-github-scm:
126           url: '{git-clone-url}{github-org}/{project}'
127           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
128           branch: '$sha1'
129           submodule-recursive: '{submodule-recursive}'
130           submodule-timeout: '{submodule-timeout}'
131           choosing-strategy: default
132           jenkins-ssh-credential: '{jenkins-ssh-credential}'
133
134     triggers:
135       - github-pull-request:
136           trigger-phrase: '^(recheck|reverify)$'
137           only-trigger-phrase: false
138           status-context: 'Node Verify'
139           permit-all: true
140           github-hooks: true
141           included-regions: '{obj:github_included_regions}'
142           white-list-target-branches:
143             - '{branch}'