A plugin for jenkins-job-builder to support pipeline job generation.
Plugin adds a new project-type pipeline
and a job definition field pipeline
.
There are two distinct job definitions.
Create a pipeline job with a DSL script:
- job:
name: example-script
project-type: pipeline
pipeline:
script: |
# Your dsl script goes here.
node {
echo 'Hello world'
}
sandbox: true # Use groovy sandbox, false by default.
Create a pipeline job loading pipeline script from SCM.
- job:
name: example-scm-script
project-type: pipeline
pipeline:
script-path: subdir/Jenkinsfile # path to pipeline script definition, "Jenkinsfile" by default.
scm: # normal scm definitions
- git:
branches:
- '*/maser'
url: '[email protected]:github-username/repository-name.git'
basedir: 'subdir'
skip-tag: true
wipe-workspace: false
Definition type is chosen automatically by detecting presence of "scm" field.