The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Table of Contents


jobDsl: Process Job DSLs

  • additionalClasspath (optional)
    Newline separated list of additional classpath entries for the Job DSL scripts. All entries must be relative to the workspace root, e.g. build/classes/main. Supports Ant-style patterns like lib/*.jar.
    • Type: String
  • additionalParameters (optional)
  • failOnMissingPlugin (optional)
    If checked, the build will be marked as failed if a plugin must be installed or updated to support all features used in the DSL scripts. If not checked, the build will be marked as unstable instead.
    • Type: boolean
  • ignoreExisting (optional)
    Ignore previously generated jobs and views. By default, this plugin will always regenerate all jobs and views, thus updating previously generated jobs and views. Check this box if you wish to leave previous jobs and views as is.
    • Type: boolean
  • ignoreMissingFiles (optional)
    Ignore missing DSL scripts. If not checked, the build step will fail if a configured script is missing or if a wildcard does not match any files.
    • Type: boolean
  • lookupStrategy (optional)
    Determines how relative job names in DSL scripts are interpreted. You will only see a difference when the seed job is located in a folder.
    • Jenkins Root When this option is selected relative job names are always interpreted relative to the Jenkins root.
    • Seed Job If you choose this option relative job names in DSL scripts will be interpreted relative to the folder in which the seed job is located. Suppose you have a seed job which is located in a folder named seedJobFolder and a DSL script which creates a job named subfolder2/job. The job that is created by the seed job will be at the location /seedJobFolder/subfolder2/job.
  • removedConfigFilesAction (optional)
    • Values: IGNORE, DELETE
  • removedJobAction (optional)
    Specifies what to do when a previously generated job is not referenced anymore.
  • removedViewAction (optional)
    Specifies what to do when a previously generated view is not referenced anymore.
    • Values: IGNORE, DELETE
  • sandbox (optional)
    If checked, runs the DSL scripts in a sandbox with limited abilities. You will also need to configure this job to run with the identity of a particular user. If unchecked, and you are not a Jenkins administrator, you will need to wait for an administrator to approve the scripts.
    • Type: boolean
  • scriptText (optional)
    DSL Script, which is groovy code. Look at documentation for details on the syntax.
    • Type: String
  • targets (optional)
    Newline separated list of DSL scripts, located in the Workspace. Can use wildcards like 'jobs/**/*.groovy'. See the @includes of Ant fileset for the exact format.

    Scripts are executed in the same order as specified. The execution order of expanded wildcards is unspecified.

    • Type: String
  • unstableOnDeprecation (optional)
    If checked, marks the build as unstable when using deprecated features. If not checked, a warning will be printed to the build log only.
    • Type: boolean
  • useScriptText (optional)
    • Type: boolean

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?


See existing feedback here.