Flow ProjectΒΆ
The flow Project module handles creating Jenkins flow projects.
You may specify flow
in the project-type
attribute of
the Job definition.
Requires the Jenkins Build Flow 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: |
|
---|
Job example:
- job: name: test_job project-type: flow dsl: | build("job1") parallel ( { build("job2a") }, { build("job2b") } )
Job template example:
- job-template: name: '{name}-unit-tests' project-type: flow dsl: | build("job1") parallel ( {{ build("job2a") }}, {{ build("job2b") }} ) build("job2c") builders: - shell: unittest publishers: - email: recipients: '{mail-to}' - job-group: name: '{name}-tests' jobs: - '{name}-unit-tests': mail-to: developer@nowhere.net - project: name: project-name jobs: - '{name}-tests'
Job example runninng a DSL file from the workspace:
- job: name: test_job project-type: flow needs-workspace: true dsl-file: script.groovy