NodeJS Jobs

Job Groups

Job groups are a great tool to configure categories of jobs together at the same time. Below the example are some starting point job-groups but we recommend creating your own to ensure that the jobs configured reflect the project’s needs.

An example project:

- job-group:
    name: odl-maven-jobs

    jobs:
      - gerrit-maven-clm
      - gerrit-maven-merge
      - gerrit-maven-release
      - gerrit-maven-verify
      - gerrit-maven-verify-dependencies:
          build-timeout: 180

    mvn-version: mvn35

- project:
    name: aaa
    jobs:
      - odl-maven-jobs

In this example we are using the job-group to assign a list of common jobs to the aaa project. The job-group also hardcodes mvn-version to mvn35 and build-timeout to 180 for all projects using this job-group.

A benefit of this method is for example disabling entire category of jobs by modifying the job-group, insert disable-job: true parameter against the jobs to disable.

Below is a list of Node job groups:

---
- 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

Job Templates

Node Verify

Verify job for NodeJS projects

Template Names:
  • {project-name}-node-verify-{stream}

  • gerrit-node-verify

  • github-node-verify

Comment Trigger:

recheck|reverify

Required parameters:
build-node:

The node to run build on.

jenkins-ssh-credential:

Credential to use for SSH. (Generally set in defaults.yaml)

node-version:

Version of NodeJS to install. Default defined in job-group.

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 minutes 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 representing a release code-name. Often the same as the branch. (default: master)

submodule-recursive:

Whether to checkout submodules recursively. (default: true)

submodule-timeout:

Timeout (in minutes) for checkout operation. (default: 10)

submodule-disable:

Disable submodule checkout operation. (default: false)

gerrit_verify_triggers:

Override Gerrit Triggers.

gerrit_trigger_file_paths:

Override file paths filter which checks which file modifications will trigger a build.