3 name: '{project-name}-github-node-jobs'
5 # Job group containing recommended jobs to deploy for a Node Project.
13 name: '{project-name}-node-jobs'
15 # Job group containing recommended jobs to deploy for a Node Project.
26 - lf_node_verify: &lf_node_verify
29 # Verify job for NodeJS projects
31 # Required parameters:
33 # :build-node: The node to run build on.
34 # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
35 # be configured in defaults.yaml)
36 # :node-version: Version of NodeJS to install. A default is configured
37 # via the job-group if a job-group is used.
39 # Optional parameters:
41 # :branch: The branch to build against. (default: master)
42 # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
43 # :build-timeout: Timeout in seconds before aborting build. (default: 10)
44 # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
45 # :node-dir: Path to a NodeJS project to run node test against
47 # :stream: Keyword that can be used to represent a release code-name.
48 # Often the same as the branch. (default: master)
49 # :submodule-recursive: Whether to checkout submodules recursively.
52 # :gerrit_verify_triggers: Override Gerrit Triggers.
53 # :gerrit_trigger_file_paths: Override file paths which can be used to
54 # filter which file modifications will trigger a build.
56 ######################
57 # Default parameters #
58 ######################
63 git-url: '$GIT_URL/$GERRIT_PROJECT'
66 submodule-recursive: true
68 gerrit_trigger_file_paths:
70 pattern: '{node-dir}/**'
72 gerrit_verify_triggers:
73 - patchset-created-event:
75 exclude-trivial-rebase: false
76 exclude-no-code-change: false
77 - draft-published-event
78 - comment-added-contains-event:
79 comment-contains-value: recheck$
85 project-type: freestyle
90 - lf-infra-properties:
91 build-days-to-keep: '{build-days-to-keep}'
94 - lf-infra-parameters:
98 lftools-version: '{lftools-version}'
99 - lf-infra-node-parameters:
100 node-dir: '{node-dir}'
101 node-version: '{node-version}'
105 build-timeout: '{build-timeout}'
106 jenkins-ssh-credential: '{jenkins-ssh-credential}'
109 - shell: !include-raw-escape:
110 - ../shell/node-install.sh
111 - ../shell/node-run.sh
117 name: '{project-name}-node-verify-{stream}'
118 id: gerrit-node-verify
122 - lf-infra-gerrit-scm:
123 jenkins-ssh-credential: '{jenkins-ssh-credential}'
125 refspec: '$GERRIT_REFSPEC'
126 branch: 'origin/$GERRIT_BRANCH'
127 submodule-recursive: '{submodule-recursive}'
128 choosing-strategy: gerrit
132 server-name: '{gerrit-server-name}'
133 trigger-on: '{obj:gerrit_verify_triggers}'
135 - project-compare-type: ANT
136 project-pattern: '{project}'
138 - branch-compare-type: ANT
139 branch-pattern: '**/{branch}'
140 file-paths: '{obj:gerrit_trigger_file_paths}'
143 name: '{project-name}-node-verify-{stream}'
144 id: github-node-verify
149 url: '{git-url}/{github-org}/{project}'
152 - lf-infra-github-scm:
153 url: '{git-clone-url}{github-org}/{project}'
154 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
156 submodule-recursive: '{submodule-recursive}'
157 choosing-strategy: default
158 jenkins-ssh-credential: '{jenkins-ssh-credential}'
161 - github-pull-request:
162 trigger-phrase: '^recheck$'
163 only-trigger-phrase: false
164 status-context: 'Node Verify'
167 auto-close-on-fail: false