This is the base class for all job builders. It can be extended to create templates for job configurations. It can store multiple DSL closures which are concatenated when JobBuilder.build is called. They are executed in the order they are added to the builder. For detailed usage see the README file and the examples.
| Type | Name and description |
|---|---|
java.util.List<groovy.lang.Closure> |
dslClosures |
javaposse.jobdsl.dsl.DslFactory |
dslFactory |
java.util.List<java.lang.String> |
folders |
java.lang.Class<? extends javaposse.jobdsl.dsl.Job> |
jobClass |
java.lang.String |
name |
| Constructor and description |
|---|
JobBuilder
(javaposse.jobdsl.dsl.DslFactory dslFactory) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addDsl(groovy.lang.Closure closure)Add a DSL closure to the list of closures that will be used to create the job. |
|
void |
addFreeStyleDsl(groovy.lang.Closure closure)Convenience method to get full IDE support when adding a DSL closure for a @{link FreeStyleJob}. |
|
void |
addMatrixDsl(groovy.lang.Closure closure)Convenience method to get full IDE support when adding a DSL closure for a @{link MatrixJob}. |
|
void |
addMavenDsl(groovy.lang.Closure closure)Convenience method to get full IDE support when adding a DSL closure for a @{link MavenJob}. |
|
void |
addMultiDsl(groovy.lang.Closure closure)Convenience method to get full IDE support when adding a DSL closure for a @{link MultiJob}. |
|
void |
addPipelineDsl(groovy.lang.Closure closure)Convenience method to get full IDE support when adding a DSL closure for a @{link WorkflowJob}. |
|
javaposse.jobdsl.dsl.Job |
build()Create the job object using the configured DSL closures and job class. |
|
void |
buildFlowJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.BuildFlowJob and add the provided DSL closure to the list of closures. |
|
void |
checkJobClassNull() |
|
void |
checkNameIsValid() |
|
groovy.lang.Closure |
concatenateDslClosures() |
|
void |
freeStyleJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.FreeStyleJob and add the provided DSL closure to the list of closures. |
|
java.lang.String |
fullJobName()Return the full job name including folders. |
|
void |
matrixJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.MatrixJob and add the provided DSL closure to the list of closures. |
|
void |
mavenJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.MavenJob and add the provided DSL closure to the list of closures. |
|
void |
multiJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.MultiJob and add the provided DSL closure to the list of closures. |
|
void |
pipelineJob(groovy.lang.Closure closure = null)Set the job type to javaposse.jobdsl.dsl.jobs.WorkflowJob and add the provided DSL closure to the list of closures. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Add a DSL closure to the list of closures that will be used to create the job.
Convenience method to get full IDE support when adding a DSL closure for a @{link FreeStyleJob}. The closure is forwarded to JobBuilder.addDsl.
Convenience method to get full IDE support when adding a DSL closure for a @{link MatrixJob}. The closure is forwarded to JobBuilder.addDsl.
Convenience method to get full IDE support when adding a DSL closure for a @{link MavenJob}. The closure is forwarded to JobBuilder.addDsl.
Convenience method to get full IDE support when adding a DSL closure for a @{link MultiJob}. The closure is forwarded to JobBuilder.addDsl.
Convenience method to get full IDE support when adding a DSL closure for a @{link WorkflowJob}. The closure is forwarded to JobBuilder.addDsl.
Create the job object using the configured DSL closures and job class.
Set the job type to javaposse.jobdsl.dsl.jobs.BuildFlowJob and add the provided DSL closure to the list of closures.
Set the job type to javaposse.jobdsl.dsl.jobs.FreeStyleJob and add the provided DSL closure to the list of closures.
Return the full job name including folders.
Set the job type to javaposse.jobdsl.dsl.jobs.MatrixJob and add the provided DSL closure to the list of closures.
Set the job type to javaposse.jobdsl.dsl.jobs.MavenJob and add the provided DSL closure to the list of closures.
Set the job type to javaposse.jobdsl.dsl.jobs.MultiJob and add the provided DSL closure to the list of closures.
Set the job type to javaposse.jobdsl.dsl.jobs.WorkflowJob and add the provided DSL closure to the list of closures.
Groovy Documentation