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