Workflow Project

Deprecated: please use Pipeline Project instead.

The workflow Project module handles creating Jenkins workflow projects. You may specify workflow in the project-type attribute of the Job definition. For now only inline scripts are supported.

Requires the Jenkins Workflow Plugin.

In order to use it for job-template you have to escape the curly braces by doubling them in the DSL: { -> {{ , otherwise it will be interpreted by the python str.format() command.

Job Parameters:
  • dsl (str): The DSL content.

  • sandbox (bool): If the script should run in a sandbox (default false)

Job example:

- job:
    name: test_job
    project-type: workflow
    dsl: |
      build job: "job1"
      parallel [
        2a: build job: "job2a",
        2b: node "dummynode" {{
          sh "echo I'm alive!"
        }}
      ]

Job template example:

- job-template:
    name: '{name}-unit-tests'
    project-type: workflow
    dsl: |
        build job: "job1"
        parallel [
          2a: build job: "job2a",
          2b: node "dummynode" {{
            sh "echo {isay}"
          }}
        ]

- job-group:
    name: '{name}-tests'
    jobs:
      - '{name}-unit-tests':
          isay: 'hello'

- project:
    name: project-name
    jobs:
    - '{name}-tests'
class project_workflow.Workflow(registry)
sequence = 0

The sequence number for the module. Modules are invoked in the order of their sequence number in order to produce consistently ordered XML output.