f992d34cbf3518f906b043dd1a975f8381edcf81
[releng/global-jjb.git] / 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     git-url: '$GIT_URL/$GERRIT_PROJECT'
37     node-dir: ''
38     stream: master
39     submodule-recursive: true
40
41     gerrit_trigger_file_paths:
42       - compare-type: ANT
43         pattern: '{node-dir}/**'
44
45     gerrit_verify_triggers:
46       - patchset-created-event:
47           exclude-drafts: false
48           exclude-trivial-rebase: false
49           exclude-no-code-change: false
50       - draft-published-event
51       - comment-added-contains-event:
52           comment-contains-value: recheck$
53
54     #####################
55     # Job Configuration #
56     #####################
57
58     project-type: freestyle
59     node: '{build-node}'
60     concurrent: true
61
62     properties:
63       - lf-infra-properties:
64           build-days-to-keep: '{build-days-to-keep}'
65
66     parameters:
67       - lf-infra-parameters:
68           project: '{project}'
69           branch: '{branch}'
70           stream: '{stream}'
71           lftools-version: '{lftools-version}'
72       - lf-infra-node-parameters:
73           node-dir: '{node-dir}'
74           node-version: '{node-version}'
75
76     wrappers:
77       - lf-infra-wrappers:
78           build-timeout: '{build-timeout}'
79           jenkins-ssh-credential: '{jenkins-ssh-credential}'
80
81     builders:
82       - shell: !include-raw-escape:
83           - ../shell/node-install.sh
84           - ../shell/node-run.sh
85
86     publishers:
87       - lf-infra-publish
88
89 - job-template:
90     name: '{project-name}-node-verify-{stream}'
91     id: gerrit-node-verify
92     <<: *lf_node_verify
93
94     scm:
95       - lf-infra-gerrit-scm:
96           jenkins-ssh-credential: '{jenkins-ssh-credential}'
97           git-url: '{git-url}'
98           refspec: '$GERRIT_REFSPEC'
99           branch: 'origin/$GERRIT_BRANCH'
100           submodule-recursive: '{submodule-recursive}'
101           choosing-strategy: gerrit
102
103     triggers:
104       - gerrit:
105           server-name: '{gerrit-server-name}'
106           trigger-on: '{obj:gerrit_verify_triggers}'
107           projects:
108             - project-compare-type: ANT
109               project-pattern: '{project}'
110               branches:
111                 - branch-compare-type: ANT
112                   branch-pattern: '**/{branch}'
113               file-paths: '{obj:gerrit_trigger_file_paths}'
114
115 - job-template:
116     name: '{project-name}-node-verify-{stream}'
117     id: github-node-verify
118     <<: *lf_node_verify
119
120     properties:
121       - github:
122           url: '{git-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: '{branch}'
129           submodule-recursive: '{submodule-recursive}'
130           choosing-strategy: default
131           jenkins-ssh-credential: '{jenkins-ssh-credential}'
132
133     triggers:
134       - github-pull-request:
135           trigger-phrase: '^recheck$'
136           only-trigger-phrase: false
137           status-context: 'Node Verify'
138           permit-all: true
139           github-hooks: true
140           auto-close-on-fail: false