Skip to content

Jenkins Job DSL Architecture

andrewharmellaw edited this page Apr 4, 2012 · 5 revisions

The DSL scripts are executed in the context of a JobParent that adds a "job" function to define individual jobs. It'll create a Job instance that has DSL methods to support the job being configured. Both JobParent and Job will defer to an instance of JobManagement to load and save a Jenkin's config.xml. DslScriptLoader will setup and execute DSL scripts with a provided JobManagement instance. FileJobManagement is an implementation to load/save configs from the filesystem. While when the plugin is running from ExecuteDslScripts, it creates a JobManagement instance which calls back into Jenkins. The primary entry point of the plugin is ExecuteDslScripts, who is responsible for consuming the "seed" job's definition of where the DSL files are. As it finds dsl files, it sets up a JobManagement instance and calls DslScriptLoader.