Matrix ProjectΒΆ

The matrix project module handles creating Jenkins matrix projects. To create a matrix project specify matrix in the project-type attribute to the Job definition. Currently it only supports three axes which share the same internal YAML structure:

  • label expressions (label-expression)
  • user-defined values (user-defined)
  • slave name or label (slave)
Job Parameters:
  • execution-strategy (optional):
    • combination-filter (str): axes selection filter

    • sequential (bool): run builds sequentially (default false)

    • touchstone (optional):
      • expr (str) – selection filter for the touchstone build
      • result (str) – required result of the job: stable (default) or unstable
  • axes (list):
    • axis:
      • type (str) – axis type, must be either ‘label-expression’, ‘user-defined’ or ‘slave’.
      • name (str) – name of the axis
      • values (list) – values of the axis

Example:

- job:
   name: matrix-test
   project-type: matrix
   execution-strategy:
     combination-filter: |
       !(os=="fedora11" && arch=="amd64")
     sequential: true
     touchstone:
       expr: 'os == "fedora11"'
       result: unstable
   axes:
     - axis:
        type: label-expression
        name: os
        values:
         - ubuntu12.04
         - fedora11
     - axis:
        type: label-expression
        name: arch
        values:
         - amd64
         - i386
     - axis:
        type: slave
        name: nodes
        values:
         - node1
         - node2
   builders:
     - shell: make && make check

Example using user-defined axis:

- job:
   name: matrix-user-defined
   project-type: matrix
   axes:
     - axis:
       type: user-defined
       name: database
       values:
        - mysql
        - postgresql
        - sqlite
   builders:
    - shell: make "$database"

Previous topic

Maven Project

Next topic

General Job Configuration

This Page