---
-- job-group:
- name: '{project-name}-github-node-jobs'
-
- # Job group containing recommended jobs to deploy for a Node Project.
-
- node-version: 6.11.4
-
- jobs:
- - github-node-verify
-
-- job-group:
- name: '{project-name}-node-jobs'
-
- # Job group containing recommended jobs to deploy for a Node Project.
-
- node-version: 6.11.4
-
- jobs:
- - gerrit-node-verify
###############
# Node Verify #
- lf_node_verify: &lf_node_verify
name: lf-node-verify
- # Verify job for NodeJS projects
- #
- # Required parameters:
- #
- # :build-node: The node to run build on.
- # :jenkins-ssh-credential: Credential to use for SSH. (Generally should
- # be configured in defaults.yaml)
- # :node-version: Version of NodeJS to install. A default is configured
- # via the job-group if a job-group is used.
- #
- # Optional parameters:
- #
- # :branch: The branch to build against. (default: master)
- # :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
- # :build-timeout: Timeout in seconds before aborting build. (default: 10)
- # :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
- # :node-dir: Path to a NodeJS project to run node test against
- # (default: '')
- # :stream: Keyword that can be used to represent a release code-name.
- # Often the same as the branch. (default: master)
- # :submodule-recursive: Whether to checkout submodules recursively.
- # (default: true)
- #
- # :gerrit_verify_triggers: Override Gerrit Triggers.
- # :gerrit_trigger_file_paths: Override file paths which can be used to
- # filter which file modifications will trigger a build.
-
######################
# Default parameters #
######################
branch: master
build-days-to-keep: 7
build-timeout: 10
+ disable-job: false
git-url: '$GIT_URL/$GERRIT_PROJECT'
+ github-url: 'https://github.com'
node-dir: ''
stream: master
submodule-recursive: true
+ submodule-timeout: 10
gerrit_trigger_file_paths:
- - compare-type: ANT
- pattern: '{node-dir}/**'
+ - compare-type: REG_EXP
+ pattern: '.*'
- gerrit_verify_triggers:
- - patchset-created-event:
- exclude-drafts: false
- exclude-trivial-rebase: false
- exclude-no-code-change: false
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: recheck$
+ # github_included_regions MUST match gerrit_trigger_file_paths
+ github_included_regions:
+ - '.*'
#####################
# Job Configuration #
project-type: freestyle
node: '{build-node}'
concurrent: true
+ disabled: '{disable-job}'
properties:
- lf-infra-properties:
project: '{project}'
branch: '{branch}'
stream: '{stream}'
- lftools-version: '{lftools-version}'
- lf-infra-node-parameters:
node-dir: '{node-dir}'
node-version: '{node-version}'
id: gerrit-node-verify
<<: *lf_node_verify
+ ######################
+ # Default parameters #
+ ######################
+
+ gerrit_verify_triggers:
+ - patchset-created-event:
+ exclude-drafts: true
+ exclude-trivial-rebase: false
+ exclude-no-code-change: false
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
+
+ #####################
+ # Job Configuration #
+ #####################
+
scm:
- lf-infra-gerrit-scm:
jenkins-ssh-credential: '{jenkins-ssh-credential}'
refspec: '$GERRIT_REFSPEC'
branch: 'origin/$GERRIT_BRANCH'
submodule-recursive: '{submodule-recursive}'
+ submodule-timeout: '{submodule-timeout}'
choosing-strategy: gerrit
triggers:
<<: *lf_node_verify
properties:
+ - lf-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
- github:
- url: '{git-url}/{github-org}/{project}'
+ url: '{github-url}/{github-org}/{project}'
scm:
- lf-infra-github-scm:
url: '{git-clone-url}{github-org}/{project}'
refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
- branch: '{branch}'
+ branch: '$sha1'
submodule-recursive: '{submodule-recursive}'
+ submodule-timeout: '{submodule-timeout}'
choosing-strategy: default
jenkins-ssh-credential: '{jenkins-ssh-credential}'
triggers:
- github-pull-request:
- trigger-phrase: '^recheck$'
+ trigger-phrase: '^(recheck|reverify)$'
only-trigger-phrase: false
status-context: 'Node Verify'
permit-all: true
github-hooks: true
- auto-close-on-fail: false
+ included-regions: '{obj:github_included_regions}'
+ white-list-target-branches:
+ - '{branch}'